Struct lrs::sync::Queue

A multi-threaded queue.

Syntax

struct Queue<T, Heap = Libc>
    where Heap: Allocator,
{
    /* private fields */
}

Static methods

NameDescription
new

Creates a new queue with allocated memory.

Methods

ReceiverNameDescription
&selfpop

Removes an element to the queue.

&selfpop_wait

Blocks until there is an element in the queue.

&selfpush

Tries to add an element to the queue.

&selfpush_wait

Blocks until it can add the element to the queue.

Trait implementations

NameDescription
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.

Remarks

This queue can be used for sending messages between threads.