#dispatch #gcd #macos-ios #ios #macos #libdispatch

no-std dispatch2

Bindings and wrappers for Apple's Grand Central Dispatch (GCD)

2 unstable releases

0.2.0 Jan 23, 2025
0.1.0 Oct 1, 2022

#75 in macOS and iOS APIs

Download history 488/week @ 2024-12-19 233/week @ 2024-12-26 452/week @ 2025-01-02 910/week @ 2025-01-09 953/week @ 2025-01-16 1080/week @ 2025-01-23 1103/week @ 2025-01-30 1261/week @ 2025-02-06 1212/week @ 2025-02-13 1605/week @ 2025-02-20 6114/week @ 2025-02-27 22037/week @ 2025-03-06 45730/week @ 2025-03-13 53217/week @ 2025-03-20 51670/week @ 2025-03-27 39037/week @ 2025-04-03

195,692 downloads per month
Used in 104 crates (10 directly)

Zlib OR Apache-2.0 OR MIT

1MB
18K SLoC

Apple's Dispatch (Grand Central Dispatch)

This crate provides a safe and sound interface to Apple's Grand Central dispatch, as well as the ability to drop into lower-level bindings ([ffi] module).

See Apple's documentation and the source code for libdispatch for more details.

Example

use dispatch2::{Queue, QueueAttribute};

let queue = Queue::new("example_queue", QueueAttribute::Serial);
queue.exec_async(|| println!("Hello"));
queue.exec_sync(|| println!("World"));

dispatch2

Latest version License Documentation CI

Rust bindings to Apple's Grand Central Dispatch.

This README is kept intentionally small to consolidate the documentation, see the Rust docs for more details on this crate.

This crate is part of the objc2 project, see that for related crates.

Dependencies