IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Base class for objects that perform waiting until a condition is fulfilled. More...
Public Member Functions | |
abstract bool | Condition () |
Returns true if unblocking condition is satisfied, and false otherwise. More... | |
virtual void | CancelOne () |
Cancels the current waiting for the condition (if one is going on) and unblocks the thread on which waiting was called (possibly with some latency). More... | |
virtual void | CancelAll () |
Cancel the current waiting for the condition on all threads. More... | |
abstract void | Wait () |
Blocks until the specified condition gets satisfied. See class description for details. More... | |
Properties | |
object | Lock [get] |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More... | |
object | InternalLock [get] |
Used internally for locking access to internal fields. More... | |
object | WaitLock [get] |
Must be used only for locking waiting the Waiting() block (since it is potentially time consuming). More... | |
virtual bool | IsWaiting [get, protected set] |
True if waiting for unblocking condition is currently performed, and false otherwise. Setting should only be done within the waiting function. More... | |
virtual bool | CancelFlag [get, set] |
If this flag is set then the current waiting (if one is going on) will be cancelled. More... | |
Properties inherited from IG.Lib.IWaitCondition | |
bool | IsWaiting [get] |
Returns true if waiting for unblocking condition is currently performed, and false otherwise. Setting should only be done within the waiting function. More... | |
Properties inherited from IG.Lib.ILockable | |
object | Lock [get] |
Private Attributes | |
object | mainlock = new object() |
object | internallock = new object() |
object | waitlock = new object() |
int | _numWaiting = 0 |
bool | _canceFlag = false |
Base class for objects that perform waiting until a condition is fulfilled.
|
pure virtual |
Returns true if unblocking condition is satisfied, and false otherwise.
Implements IG.Lib.IWaitCondition.
Implemented in IG.Lib.WaitDirectoryRemovalLatence, IG.Lib.WaitDirectoryCreationLatence, IG.Lib.WaitFileRemovalLatence, IG.Lib.WaitFileCreationLatence, IG.Lib.WaitFileEventLatenceBase, IG.Lib.WaitFileEventBaseByProxyLatence, IG.Lib.WaitDirectoryRemoval, IG.Lib.WaitDirectoryCreation, IG.Lib.WaitFileRemoval, IG.Lib.WaitFileCreation, IG.Lib.WaitFileEventBase, and IG.Lib.WaitCondition.
|
inlinevirtual |
Cancels the current waiting for the condition (if one is going on) and unblocks the thread on which waiting was called (possibly with some latency).
Implements IG.Lib.IWaitCondition.
Reimplemented in IG.Lib.WaitFileEventBaseByProxyLatence, and IG.Lib.WaitFileEventBase.
Referenced by IG.Lib.WaitFileEventBaseByProxyLatence.CancelOne().
|
inlinevirtual |
Cancel the current waiting for the condition on all threads.
Implements IG.Lib.IWaitCondition.
Reimplemented in IG.Lib.WaitFileEventBase.
|
pure virtual |
Blocks until the specified condition gets satisfied. See class description for details.
This method will normally not be overridden, except with intention to change the condition check time plan. When overriding, use the original method as template.
Implements IG.Lib.IWaitCondition.
Implemented in IG.Lib.WaitFileEventBaseByProxyLatence, IG.Lib.WaitDirectoryRemoval, IG.Lib.WaitDirectoryCreation, IG.Lib.WaitFileRemoval, IG.Lib.WaitFileCreation, IG.Lib.WaitFileEventBase, and IG.Lib.WaitCondition.
|
private |
|
private |
|
private |
|
private |
|
private |
|
get |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock.
|
getprotected |
Used internally for locking access to internal fields.
|
getprotected |
Must be used only for locking waiting the Waiting() block (since it is potentially time consuming).
|
getprotected set |
True if waiting for unblocking condition is currently performed, and false otherwise. Setting should only be done within the waiting function.
|
getsetprotected |
If this flag is set then the current waiting (if one is going on) will be cancelled.