C# Class Amib.Threading.Internal.WorkItemsQueue

WorkItemsQueue class.
Inheritance: IDisposable
ファイルを表示 Open project: SQLServerIO/TPCCBench Class Usage Examples

Private Properties

Property Type Description
GetThreadWaiterEntry WaiterEntry
PopWaiter WaiterEntry
RemoveWaiter void
ValidateNotDisposed void

Public Methods

Method Description
DequeueWorkItem ( int millisecondsTimeout, WaitHandle cancelEvent ) : WorkItem

Waits for a work item or exits on timeout or cancel

Dispose ( ) : void
EnqueueWorkItem ( WorkItem workItem ) : bool

Enqueue a work item to the queue.

PushWaiter ( WaiterEntry newWaiterEntry ) : void

Push a new waiter into the waiter's stack

Protected Methods

Method Description
Cleanup ( ) : void

Cleanup the work items queue, hence no more work items are allowed to be queue

Private Methods

Method Description
GetThreadWaiterEntry ( ) : WaiterEntry

Returns the WaiterEntry of the current thread

PopWaiter ( ) : WaiterEntry

Pop a waiter from the waiter's stack

RemoveWaiter ( WaiterEntry waiterEntry, bool popDecrement ) : void

Remove a waiter from the stack

ValidateNotDisposed ( ) : void

Method Details

Cleanup() protected method

Cleanup the work items queue, hence no more work items are allowed to be queue
protected Cleanup ( ) : void
return void

DequeueWorkItem() public method

Waits for a work item or exits on timeout or cancel
public DequeueWorkItem ( int millisecondsTimeout, WaitHandle cancelEvent ) : WorkItem
millisecondsTimeout int Timeout in milliseconds
cancelEvent System.Threading.WaitHandle Cancel wait handle
return WorkItem

Dispose() public method

public Dispose ( ) : void
return void

EnqueueWorkItem() public method

Enqueue a work item to the queue.
public EnqueueWorkItem ( WorkItem workItem ) : bool
workItem WorkItem
return bool

PushWaiter() public method

Push a new waiter into the waiter's stack
public PushWaiter ( WaiterEntry newWaiterEntry ) : void
newWaiterEntry WaiterEntry A waiter to put in the stack
return void