Struct cc_queue::CcQueue [] [src]

pub struct CcQueue<T, A: Allocator>(_);

This is the cc queue object. It is safe to send references between threads. Each thread accessing the queue should call new_per_thread_handle. The queue supports being dropped and all Nodes being freed, however... It does not have any way to free the data owned by the nodes, so a memory leak is quite likely. Instead, it is better to call clear() with a callback which can free node data, which requires that there are no PerQueueThreadHandle in existence, even for the current thread. Rust's borrow checker should be able to enforce this.

Methods

impl<T, A: Allocator> CcQueue<T, A>
[src]

[src]

Create a new queue. Specify an allocator implementation which provides memory for the queue and its nodes. This can be the heap, or it can be a persistent memory or mmap'd file.

[src]

Create a new per-thread handle.

[src]

Clear the queue. Only works on a queue that is acquiescent.

Trait Implementations

impl<T: Debug, A: Debug + Allocator> Debug for CcQueue<T, A>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T, A: Allocator> Send for CcQueue<T, A>
[src]

impl<T, A: Allocator> Sync for CcQueue<T, A>
[src]

impl<T, A: Allocator> AllocatorOpened<A> for CcQueue<T, A>
[src]

[src]

Allocator was opened. Reset any temporary state, or adjust pointer offsets. Read more

impl<T, A: Allocator> Drop for CcQueue<T, A>
[src]

[src]

Executes the destructor for this type. Read more

Auto Trait Implementations