Struct fruity__bbqsrc::dispatch::DispatchSource[][src]

#[repr(C)]
pub struct DispatchSource(_);
Expand description

An object that coordinates the processing of specific low-level system events, such as file-system events, timers, and UNIX signals.

Documentation: Swift | Objective-C

Implementations

Creates a new dispatch source to monitor low-level system events.

Dispatch sources are created in a suspended state. After creating the source and setting any desired attributes (for example, the handler or the context), your application must call activate to begin event delivery.

Important: Event source creation is asynchronous, so be aware of any race conditions with monitored system handles. For example, if a dispatch source is created for a process and that process exits before the source is created, any specified cancellation handler may not be called.

Documentation: Objective-C

Safety

The expectations for the given source type must be upheld.

Returns pending data for this dispatch source.

Documentation: Swift | Objective-C

Merges data into a dispatch source and submits its event handler block to its target queue.

Documentation: Objective-C

Safety

This dispatch source must be of type DispatchSourceType::data_add or DispatchSourceType::data_or.

Returns the mask of events monitored by this dispatch source.

Documentation: Swift | Objective-C

Returns the underlying system handle associated with this dispatch source.

Documentation: Swift | Objective-C

Sets a start time, interval, and leeway value for this dispatch timer source.

Documentation: Objective-C

Safety

This dispatch source must be of type DispatchSourceType::timer.

Asynchronously cancels this dispatch source, preventing any further invocation of its event handler block.

Documentation: Swift | Objective-C

Returns true if this dispatch source has been cancelled.

Documentation: Swift | Objective-C

Methods from Deref<Target = DispatchObject>

Activates self.

Once a dispatch object has been activated, it cannot change its target queue.

See documentation.

Resumes the invocation of block objects on self.

See documentation.

Suspends the invocation of block objects on self.

See documentation.

Specifies the dispatch queue on which to perform work associated with self.

If this queue has already been activated, then this method will fail.

Important: When setting up target queues, it is a programmer error to create cycles in the dispatch queue hierarchy. In other words, don’t set the target of queue A to queue B and set the target of queue B to queue A.

Documentation: Swift | Objective-C

Safety

The target queue must be expected for this dispatch object. For example, an object may expect to dispatch to the main queue.

Returns the application-defined context of an object.

See documentation.

Associates an application-defined context with the object.

See documentation.

Safety

The object or dependent code may make assumptions about its current context. Callers must be careful to not invalidate any assumptions.

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The resulting type after dereferencing.

Dereferences the value.

Increments the object’s retain count and returns a smart pointer that automatically calls release on Drop. Read more

Decrements the object’s retain count. 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

Performs the conversion.

Performs the conversion.

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.