| IGLib 1.5 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Properties | Private Attributes | List of all members
IG.Lib.WaitConditionBase Class Referenceabstract

Base class for objects that perform waiting until a condition is fulfilled. More...

Inheritance diagram for IG.Lib.WaitConditionBase:
[legend]
Collaboration diagram for IG.Lib.WaitConditionBase:
[legend]

## 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

## Detailed Description

Base class for objects that perform waiting until a condition is fulfilled.

## Member Function Documentation

abstract bool IG.Lib.WaitConditionBase.Condition | ( |  | ) |
| 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.

virtual void IG.Lib.WaitConditionBase.CancelOne | ( |  | ) |
| inline virtual

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().

virtual void IG.Lib.WaitConditionBase.CancelAll | ( |  | ) |
| inline virtual

Cancel the current waiting for the condition on all threads.

Implements IG.Lib.IWaitCondition.

Reimplemented in IG.Lib.WaitFileEventBase.

abstract void IG.Lib.WaitConditionBase.Wait | ( |  | ) |
| 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.

## Member Data Documentation

object IG.Lib.WaitConditionBase.mainlock = new object()
| private

object IG.Lib.WaitConditionBase.internallock = new object()
| private

object IG.Lib.WaitConditionBase.waitlock = new object()
| private

int IG.Lib.WaitConditionBase._numWaiting = 0
| private

bool IG.Lib.WaitConditionBase._canceFlag = false
| private

## Property Documentation

object IG.Lib.WaitConditionBase.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.

object IG.Lib.WaitConditionBase.InternalLock
| get protected

Used internally for locking access to internal fields.

object IG.Lib.WaitConditionBase.WaitLock
| get protected

Must be used only for locking waiting the Waiting() block (since it is potentially time consuming).

virtual bool IG.Lib.WaitConditionBase.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.

virtual bool IG.Lib.WaitConditionBase.CancelFlag
| get set protected

If this flag is set then the current waiting (if one is going on) will be cancelled.

The documentation for this class was generated from the following file:

- igbase/0unsorted/WaitCondition.cs