Prajna


BaseQ<'T>

The base class for various concurrent queue structures with and without flow control logic all enqueue/dequeue methods return (success, waithandle) in all classes 1. GrowQ: No limit on queue growth 2. FixedLenQ: Growth limited by queue length 3. FixedSizeQ: Growth limited by queue "size", where "size" is sum of all element sizes

Constructors

ConstructorDescription
new()
Signature: unit -> BaseQ<'T>

Instance members

Instance memberDescription
Clear()
Signature: unit -> unit
Modifiers: abstract

Function to clear out the queue

Count
Signature: int
Modifiers: abstract

Returns count of number of elements in queue

DequeueSync(arg1)
Signature: ('T ref) -> bool * ManualResetEvent
Modifiers: abstract

Abstract member to dequeue synchronously, caller will be blocked while function waits for queue to fill. Even after waiting, dequeue may not return anything in case another thread retrieves item.

DequeueWait(arg1)
Signature: ('T ref) -> bool * ManualResetEvent
Modifiers: abstract

Abstract member to dequeue without blocking caller. If queue is empty automatically returns.

DequeueWaitTime(arg1)
Signature: ('T ref) -> bool * ManualResetEvent
Modifiers: abstract

Abstract member to dequeue without blocking caller for long time. Function will block up to WaitTimeDequeueMs prior to returning.

Empty
Signature: ManualResetEvent
EnqueueSync(arg1)
Signature: 'T -> bool * ManualResetEvent
Modifiers: abstract

Abstract member to enqueue synchronously - calling thread blocked until enqueue succeeds

EnqueueWait(arg1)
Signature: 'T -> bool * ManualResetEvent
Modifiers: abstract

Abstract member to enqueue without blocking calling thread. If enqueue not sucessful returns an event which the caller can wait upon before trying again. Enqueue is not successful if queue is full.

EnqueueWaitTime(arg1)
Signature: 'T -> bool * ManualResetEvent
Modifiers: abstract

Abstract member to enqueue without blocking calling thread. Enqueue will wait for upto WaitTimeEnqueueMs milliseconds synchronously if needed. If enqueue not sucessful returns an event which the caller can wait upon before trying again. Enqueue is not successful if queue is full.

Full
Signature: ManualResetEvent
IsEmpty
Signature: bool
Modifiers: abstract

Return if queue is empty or not

WaitTimeDequeueMs()
Signature: unit -> int
WaitTimeDequeueMs()
Signature: unit -> unit
WaitTimeEnqueueMs()
Signature: unit -> int
WaitTimeEnqueueMs()
Signature: unit -> unit
Fork me on GitHub