A multi-threaded queue.
struct Queue<T, Heap = Libc>
where Heap: Allocator,
{
/* private fields */
}| Name | Description |
|---|---|
| new | Creates a new queue with allocated memory. |
| Receiver | Name | Description |
|---|---|---|
&self | pop | Removes an element to the queue. |
&self | pop_wait | Blocks until there is an element in the queue. |
&self | push | Tries to add an element to the queue. |
&self | push_wait | Blocks until it can add the element to the queue. |
| Name | Description |
|---|---|
| Drop | Objects with a destructor. |
| Send | Objects whose ownership can be moved from one thread to another. |
| Sync | Objects that allow immutable access from threads other than their owning thread. |
This queue can be used for sending messages between threads.