C# Class DotNetWorkQueue.TaskScheduling.WaitForEventOrCancelThreadPool

Allows a scheduler to indicate that it's full and cannot accept more work
Inheritance: IWaitForEventOrCancelThreadPool
Show file Open project: blehnen/DotNetWorkQueue

Public Methods

Method Description
Cancel ( ) : void

Cancels any current Wait calls

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Reset ( IWorkGroup group ) : void

Resets the wait status, causing Wait calls to wait.

Set ( IWorkGroup group ) : void

Sets the state to signaled; any Wait calls will return

Wait ( IWorkGroup group ) : bool

Waits until notified to stop waiting.

WaitForEventOrCancelThreadPool ( IWaitForEventOrCancelFactory waitForEventOrCancelFactory ) : System

Initializes a new instance of the WaitForEventOrCancelThreadPool class.

Protected Methods

Method Description
ThrowIfDisposed ( [ name = "" ) : void

Throws an exception if this instance has been disposed.

Private Methods

Method Description
TryAdd ( IWorkGroup group ) : void

Tries to add a new work group to the collection

Will gracefully handle another thread adding the group

Method Details

Cancel() public method

Cancels any current Wait calls
public Cancel ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Reset() public method

Resets the wait status, causing Wait calls to wait.
public Reset ( IWorkGroup group ) : void
group IWorkGroup The group.
return void

Set() public method

Sets the state to signaled; any Wait calls will return
public Set ( IWorkGroup group ) : void
group IWorkGroup The group.
return void

ThrowIfDisposed() protected method

Throws an exception if this instance has been disposed.
protected ThrowIfDisposed ( [ name = "" ) : void
name [ The name.
return void

Wait() public method

Waits until notified to stop waiting.
public Wait ( IWorkGroup group ) : bool
group IWorkGroup The group.
return bool

WaitForEventOrCancelThreadPool() public method

Initializes a new instance of the WaitForEventOrCancelThreadPool class.
public WaitForEventOrCancelThreadPool ( IWaitForEventOrCancelFactory waitForEventOrCancelFactory ) : System
waitForEventOrCancelFactory IWaitForEventOrCancelFactory The wait for event or cancel factory.
return System