API 0.9.5
CPOperationQueue Class Reference

Represents an operation queue that can run CPOperations. More...

#import <CPOperationQueue.h>

Inheritance diagram for CPOperationQueue:

List of all members.

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

Detailed Description

Represents an operation queue that can run CPOperations.

Definition at line 2 of file CPOperationQueue.h.


Method Documentation

- (void) addOperation: (CPOperation anOperation

Adds the specified operation object to the receiver.

Parameters:
anOperationthe 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.

Parameters:
opsThe array of CPOperation objects that you want to add to the receiver.
waitIf 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

Parameters:
aFunctionthe 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

Parameters:
suspendif 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.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines