A queue which can be shared between multiple
Threads, allowing any of them to submit messages to
or pull messages out of it. Multiple threads may simultaneously wait for a message from the same
message queue, in which case one of the waiting threads will be selected to receive the message in a
system-dependent fashion, while the other threads will continue to wait.
- Source Code:
- View Source
Instance Method Summary
- Posts an object to the queue.
- Returns the number of messages currently in the queue.
trueif there are one or more messages in the queue.
- Returns the next message from the queue, blocking until one is available.
- Remove all pending messages from the queue.
method post ( data:
Posts an object to the queue.
data the object to post
method pendingMessages ():
method hasMessage ():
method getMessage ():
Returns the next message from the queue, blocking until one is available.
- the next message from the queue
method clear ()
Remove all pending messages from the queue.