Description | Hierarchy | Fields | Methods | Properties |
type unaRandomGenThread = class(unaThread)
This thread produces random values from HPRC and other hard-predictable sources.
constructor create(aheadGenSize: unsigned = 1000; active: bool = true; priority: int = THREAD_PRIORITY_LOWEST); |
|
destructor Destroy(); override; |
|
function feed(value: unsigned): bool; |
|
function random(upperLimit: uint32 = $FFFFFFFF; maxTimeout: tTimeout = -1): uint32; |
|
function execute(globalId: unsigned): int; override; |
|
procedure AfterConstruction(); override; |
|
procedure BeforeDestruction(); override; |
|
procedure startIn(); override; |
|
procedure startOut(); override; |
property pseudoFeeds: uint64 read f_pseudoFeeds; |
|
property valuesReady: unsigned read getValuesInCacheNum; |
|
property waitTime: uint64 read f_waitTime; |
|
property waitTimeTotal: uint64 read f_waitTimeTotal; |
constructor create(aheadGenSize: unsigned = 1000; active: bool = true; priority: int = THREAD_PRIORITY_LOWEST); |
|
destructor Destroy(); override; |
|
function feed(value: unsigned): bool; |
|
Feeds a generator with new randmon value. Does nothing if ahead gen size is already reached. Returns true if value was added, or false otherwise. |
function random(upperLimit: uint32 = $FFFFFFFF; maxTimeout: tTimeout = -1): uint32; |
|
Returns random value in range 0 to upperLimit - 1.
Parameters
ReturnsRandom value or high(unsigned) in case of some internal error or if timeout had occured and maxTimeout = -1 (default). |
function execute(globalId: unsigned): int; override; |
|
procedure AfterConstruction(); override; |
|
procedure BeforeDestruction(); override; |
|
procedure startIn(); override; |
|
procedure startOut(); override; |
|
property pseudoFeeds: uint64 read f_pseudoFeeds; |
|
property valuesReady: unsigned read getValuesInCacheNum; |
|
Returns number of values in ahead-generated list. |
property waitTime: uint64 read f_waitTime; |
|
property waitTimeTotal: uint64 read f_waitTimeTotal; |
|
(c) 2012 Lake of Soft