|
activemq-cpp-3.9.5
|
This extends Scherer-Scott dual queue algorithm, differing, among other ways, by using modes within nodes rather than marked pointers. More...
#include <src/main/decaf/internal/util/concurrent/TransferQueue.h>

Public Member Functions | |
| TransferQueue () | |
| virtual | ~TransferQueue () |
| virtual void | transfer (E *e, bool timed, long long nanos) |
| Performs a put. | |
| virtual E * | transfer (bool timed, long long nanos) |
| Performs a take. | |
This extends Scherer-Scott dual queue algorithm, differing, among other ways, by using modes within nodes rather than marked pointers.
The algorithm is a little simpler than that for stacks because fulfillers do not need explicit nodes, and matching is done by CAS'ing QNode.item field from non-null to null (for put) or vice versa (for take).
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Performs a take.
| timed | if this operation should timeout |
| nanos | the timeout, in nanoseconds |
| TimeoutException | if the operation timed out waiting for the producer to offer an item. |
| InterruptedException | if the thread was interrupted while waiting for the producer to offer an item. |
Implements decaf::internal::util::concurrent::Transferer< E >.
References NULL.
|
inlinevirtual |
Performs a put.
| e | the item to be handed to a consumer; |
| timed | if this operation should timeout |
| nanos | the timeout, in nanoseconds |
| TimeoutException | if the operation timed out waiting for the consumer to accept the item offered. |
| InterruptedException | if the thread was interrupted while waiting for the consumer to accept the item offered. |
Implements decaf::internal::util::concurrent::Transferer< E >.