4
votes
Sleep sort and TThread corner case
The Programming Works
– If you have not heard it yet – an anonymous genius from 4chan invented a sleep sort, brilliant esoteric sorting algorithm. I have written sleep sort implementation based on Delphi TThread class for rosettacode project, and started to experiment with the code. One of the working variants is: program SleepSortDemo2; {$APPTYPE CONSOLE} uses SysUtils, Classes, SyncObjs; type TSleepThread = class(TThread) private FValue: Integer; FLock: TCriticalSection; protected constructor Create(AValue: Integer; ALock: TCriticalSection); procedure Execute; override; end; ...
Statistics
|
Visits by Source |
User Actions |




