dispatch2

Crates.iodispatch2
lib.rsdispatch2
version0.1.0
sourcesrc
created_at2022-10-01 23:05:32.579543
updated_at2022-10-01 23:05:32.579543
descriptionBindings and wrappers for the Grand Central Dispatch (GCD)
homepagehttps://www.github.com/marysaka/dispatch2
repositoryhttps://www.github.com/marysaka/dispatch2.git
max_upload_size
id678044
size70,731
Mary (marysaka)

documentation

README

dispatch2

Allows interaction with the Apple Dispatch library in a safe and unsafe way.

Usage

To use dispatch2, add this to your Cargo.toml:

[dependencies]
dispatch2 = "0.1.0"

Example

use dispatch2::{Queue, QueueAttribute};

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

License

dispatch2 is distributed under the terms of either the MIT license or the Apache License (Version 2.0), at the user's choice.

See LICENSE-APACHE and LICENSE-MIT.

Commit count: 0

cargo fmt