![]() |
API 0.9.5
|
Represents an operation queue that can run CPOperations. More...
#import <CPOperationQueue.h>
Instance Methods | |
(void) | - addOperation: |
(void) | - addOperations:waitUntilFinished: |
(void) | - addOperationWithFunction: |
(void) | - cancelAllOperations |
(id) | - init |
(BOOL) | - isSuspended |
(int) | - maxConcurrentOperationCount |
(CPString) | - name |
(int) | - operationCount |
(CPArray) | - operations |
(void) | - setName: |
(void) | - setSuspended: |
(void) | - waitUntilAllOperationsAreFinished |
Class Methods | |
(CPOperationQueue) | + currentQueue |
(CPOperationQueue) | + mainQueue |
Represents an operation queue that can run CPOperations.
Definition at line 2 of file CPOperationQueue.h.
- (void) addOperation: | (CPOperation) | anOperation |
Adds the specified operation object to the receiver.
anOperation | the operation that should be scheduled for execution |
Definition at line 101 of file CPOperationQueue.j.
- (void) addOperations: | (CPArray) | ops | |
waitUntilFinished: | (BOOL) | wait | |
Adds the specified array of operations to the queue.
ops | The array of CPOperation objects that you want to add to the receiver. |
wait | If YES, the method only returns once all of the specified operations finish executing. If NO, the operations are added to the queue and control returns immediately to the caller. |
Definition at line 116 of file CPOperationQueue.j.
- (void) addOperationWithFunction: | (JSObject) | aFunction |
Wraps the given js function in a CPOperation and adds it to the queue
aFunction | the JS function to add |
Definition at line 135 of file CPOperationQueue.j.
- (void) cancelAllOperations |
Cancels all queued and executing operations.
Definition at line 158 of file CPOperationQueue.j.
+ (CPOperationQueue) currentQueue |
Convenience method for one system wide singleton queue. Returns the same queue as mainQueue.
Definition at line 292 of file CPOperationQueue.j.
- (id) init |
Definition at line 38 of file CPOperationQueue.j.
- (BOOL) isSuspended |
Returns a Boolean value indicating whether the receiver is scheduling queued operations for execution.
Definition at line 209 of file CPOperationQueue.j.
+ (CPOperationQueue) mainQueue |
Convenience method for one system wide singleton queue. Returns the same queue as currentQueue.
Definition at line 278 of file CPOperationQueue.j.
- (int) maxConcurrentOperationCount |
Returns the maximum number of concurrent operations that the receiver can execute. Always returns 1 because JS doesn't have threads
Definition at line 191 of file CPOperationQueue.j.
- (CPString) name |
Synthesized accessor method.
Definition at line 304 of file CPOperationQueue.j.
- (int) operationCount |
Definition at line 145 of file CPOperationQueue.j.
- (CPArray) operations |
Definition at line 140 of file CPOperationQueue.j.
- (void) setName: | (CPString) | aValue |
Synthesized accessor method.
Definition at line 312 of file CPOperationQueue.j.
- (void) setSuspended: | (BOOL) | suspend |
Modifies the execution of pending operations
suspend | if YES, queue execution is suspended. If NO, it is resumed |
Definition at line 200 of file CPOperationQueue.j.
- (void) waitUntilAllOperationsAreFinished |
Blocks until all of the receiver’s queued and executing operations finish executing.
Definition at line 175 of file CPOperationQueue.j.