docs

You are reading the docs for v0.1.2. Nabi 0.1.2 is no longer supported. Latest release: v0.1.3 →

bare::ffi::objc::dispatch

On this page

Grand Central Dispatch: run a closure on the main queue or a global one, through a Block.

Structs

QueueSource

pub struct Queue

A dispatch queue (dispatch_queue_t).

  • pub fn main() -> Queue§

    Source

    The main thread's queue: its blocks run from the main run loop (NSApplication::run, dispatch_main).

  • pub fn global() -> Queue§

    Source

    The global concurrent queue of default quality of service.

  • pub fn as_raw(self) -> CPtr<u8>§

    Source

    The queue, for a C parameter of type dispatch_queue_t.

Trait implementations 2

Functions

dispatch_asyncSource

pub fn dispatch_async(queue: Queue, block: Block<fn()>)

Run block on queue later (dispatch_async); the queue keeps the block until it ran.