Class BlockableChannel

Package

Multi-producer-multi-consumer (MPMC) channel.

This is a channel that can be used to send data between threads. It is thread safe and can be used by multiple threads at the same time.

Additionally, the channel can be put into a blocking mode, which will cause all calls to Receive to block until the channel is unblocked.

Inner Types

Allows receiving items from a channel.

Public Methods

Close ()

All calls to Receive and ReceiveNoBlock will now return PopState.Closed.

Push (path)

Push a path to the end of the queue.

PushFront (path)

Push a path to the front of the queue.

Reopen ()

Resets a closed channel so that it can be used again.

Public Variables

allReceiversBlocked

True if blocking and all receivers are waiting for unblocking.

Public
isBlocked

If true, all calls to Receive will block until this property is set to false.

Public
isClosed

True if Close has been called.

Public
isEmpty

True if the queue is empty.

Public
numReceivers
Public

Private/Protected Members

blocked
Private
isStarving
Private
lockObj
Private Readonly
queue
Private
starving
Private
waitingReceivers
Private