Inherits from RACScheduler : NSObject
Declared in RACQueueScheduler.h

Overview

An abstract scheduler which asynchronously enqueues all its work to a Grand Central Dispatch queue.

Because RACQueueScheduler is abstract, it should not be instantiated directly. Create a subclass using the RACQueueScheduler+Subclass.h interface and use that instead. An interface for use by subclasses.

Subclasses should use performAsCurrentScheduler: to do the actual block invocation so that [RACScheduler currentScheduler] behaves as expected.

Note that RACSchedulers are expected to be serial. Subclasses must honor that contract. See RACTargetQueueScheduler for a queue-based scheduler which will enforce the serialization guarantee.

Tasks

Extension Methods

Properties

queue

The queue on which blocks are enqueued.

@property (nonatomic, readonly) dispatch_queue_t queue

Discussion

The queue on which blocks are enqueued.

Declared In

RACQueueScheduler+Subclass.h

Class Methods

wallTimeWithDate:

Converts a date into a GCD time using dispatch_walltime().

+ (dispatch_time_t)wallTimeWithDate:(NSDate *)date

Discussion

Converts a date into a GCD time using dispatch_walltime().

date - The date to convert. This must not be nil.

Declared In

RACQueueScheduler+Subclass.h

Instance Methods

initWithName:queue:

Initializes the receiver with the name of the scheduler and the queue which the scheduler should use.

- (id)initWithName:(NSString *)name queue:(dispatch_queue_t)queue

Discussion

Initializes the receiver with the name of the scheduler and the queue which the scheduler should use.

name - The name of the scheduler. If nil, a default name will be used. queue - The queue upon which the receiver should enqueue scheduled blocks. This argument must not be NULL.

Returns the initialized object.

Declared In

RACQueueScheduler+Subclass.h

performAsCurrentScheduler:

Performs the given block with the receiver as the current scheduler for queue. This should only be called by subclasses to perform scheduled blocks on their queue.

- (void)performAsCurrentScheduler:(void ( ^ ) ( void ))block

Discussion

Performs the given block with the receiver as the current scheduler for queue. This should only be called by subclasses to perform scheduled blocks on their queue.

block - The block to execute. Cannot be NULL.

Declared In

RACQueueScheduler+Subclass.h