pub struct SBQueue {
    pub raw: SBQueueRef,
}
Expand description

A libdispatch (aka Grand Central Dispatch) queue.

A program using libdispatch will create queues, put work items (functions, blocks) on the queues. The system will create / reassign pthreads to execute the work items for the queues. A serial queue will be associated with a single thread (or possibly no thread, if it is not doing any work). A concurrent queue may be associated with multiple threads.

The available queues within a process can be found discovered by inspecting the process:

// Iterate over the queues...
for queue in process.queues() {
    println!("Hello {}!", queue.queue_id());
}

If a queue is associated with a thread, it can be discovered from the thread via SBThread::queue().

Fields

raw: SBQueueRef

The underlying raw SBQueueRef.

Implementations

Check whether or not this is a valid SBQueue value.

Returns a unique identifying number for this queue that will not be used by any other queue during this process’ execution.

These ID numbers often start at 1 with the first system-created queues and increment from there.

The name of this queue.

Get an iterator over the threads associated with this queue.

Get an iterator over the pending items known to this queue.

The number of work items that this queue is currently running.

For a serial queue, this will be 0 or 1. For a concurrent queue, this may be any number.

The kind of this queue, serial or concurrent.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.