Struct dispatch::Group [] [src]

pub struct Group { /* fields omitted */ }

A Grand Central Dispatch group.

A Group is a mechanism for grouping closures and monitoring them. This allows for aggregate synchronization, so you can track when all the closures complete, even if they are running on different queues.

Methods

impl Group
[src]

Creates a new dispatch Group.

Indicates that a closure has entered self, and increments the current count of outstanding tasks. Returns a GroupGuard that should be dropped when the closure leaves self, decrementing the count.

Submits a closure asynchronously to the given Queue and associates it with self.

Schedules a closure to be submitted to the given Queue when all tasks associated with self have completed. If self is empty, the closure is submitted immediately.

Waits synchronously for all tasks associated with self to complete.

Waits for all tasks associated with self to complete within the specified duration. Returns true if the tasks completed or false if the timeout elapsed.

Waits for all tasks associated with self to complete within the specified duration. Returns true if the tasks completed or false if the timeout elapsed.

Returns whether self is currently empty.

Trait Implementations

impl Sync for Group
[src]

impl Send for Group
[src]

impl Clone for Group
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Drop for Group
[src]

A method called when the value goes out of scope. Read more