Represents an operation queue that can run CPOperations. More...
Public Member Functions | |
(CPString _name) | - accessors [implementation] |
(void) | - addOperation: [implementation] |
(void) | - addOperations:waitUntilFinished: [implementation] |
(void) | - addOperationWithFunction: [implementation] |
(void) | - cancelAllOperations [implementation] |
(id) | - init [implementation] |
(BOOL) | - isSuspended [implementation] |
(int) | - maxConcurrentOperationCount [implementation] |
(int) | - operationCount [implementation] |
(CPArray) | - operations [implementation] |
(void) | - setSuspended: [implementation] |
(void) | - waitUntilAllOperationsAreFinished [implementation] |
Static Public Member Functions | |
(CPOperationQueue) | + currentQueue [implementation] |
(CPOperationQueue) | + mainQueue [implementation] |
Represents an operation queue that can run CPOperations.
Definition at line 34 of file CPOperationQueue.j.
- (void) addOperation: | (CPOperation) | anOperation | [implementation] |
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 | ||
[implementation] |
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 | [implementation] |
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 | [implementation] |
Cancels all queued and executing operations.
Definition at line 158 of file CPOperationQueue.j.
+ (CPOperationQueue) currentQueue | [implementation] |
Convenience method for one system wide singelton queue. Returns the same queue as mainQueue.
Definition at line 288 of file CPOperationQueue.j.
- (id) init | [implementation] |
Definition at line 42 of file CPOperationQueue.j.
- (BOOL) isSuspended | [implementation] |
Returns a Boolean value indicating whether the receiver is scheduling queued operations for execution.
Definition at line 207 of file CPOperationQueue.j.
+ (CPOperationQueue) mainQueue | [implementation] |
Convenience method for one system wide singelton queue. Returns the same queue as currentQueue.
Definition at line 274 of file CPOperationQueue.j.
- (int) maxConcurrentOperationCount | [implementation] |
Returns the maximum number of concurrent operations that the receiver can execute. Always returns 1 because JS doesn't have threads
Definition at line 189 of file CPOperationQueue.j.
- (int) operationCount | [implementation] |
Definition at line 145 of file CPOperationQueue.j.
- (CPArray) operations | [implementation] |
Definition at line 140 of file CPOperationQueue.j.
- (void) setSuspended: | (BOOL) | suspend | [implementation] |
Modifies the execution of pending operations
suspend | if YES, queue execution is suspended. If NO, it is resumed |
Definition at line 198 of file CPOperationQueue.j.
- (void) waitUntilAllOperationsAreFinished | [implementation] |
Blocks until all of the receiver’s queued and executing operations finish executing.
Definition at line 173 of file CPOperationQueue.j.