API  0.9.10
CPOperationQueue Class Reference

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

#import <CPOperationQueue.h>

+ Inheritance diagram for CPOperationQueue:

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
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
(void) - applyChange:toKeyPath:
(id) - autorelease
(id) - awakeAfterUsingCoder:
(void) - awakeFromCib
(void) - bind:toObject:withKeyPath:options:
(Class) - classForCoder
(Class) - classForKeyedArchiver
(CPString- className
(id) - copy
(void) - dealloc
(CPString- description
(CPDictionary- dictionaryWithValuesForKeys:
(void) - didChange:valuesAtIndexes:forKey:
(void) - didChangeValueForKey:
(void) - didChangeValueForKey:withSetMutation:usingObjects:
(void) - doesNotRecognizeSelector:
(CPArray) - exposedBindings
(id) - forwardingTargetForSelector:
(void) - forwardInvocation:
(unsigned) - hash
(BOOL) - implementsSelector:
(CPDictionary- infoForBinding:
(BOOL) - isEqual:
(BOOL) - isKindOfClass:
(BOOL) - isMemberOfClass:
(BOOL) - isProxy
(IMP) - methodForSelector:
(CPMethodSignature) - methodSignatureForSelector:
(id) - mutableArrayValueForKey:
(id) - mutableArrayValueForKeyPath:
(id) - mutableCopy
(id) - mutableSetValueForKey:
(id) - mutableSetValueForKeyPath:
(id) - performSelector:
(id) - performSelector:withObject:
(void) - performSelector:withObject:afterDelay:
(void) - performSelector:withObject:afterDelay:inModes:
(id) - performSelector:withObject:withObject:
(id) - performSelector:withObjects:
(void) - release
(void) - removeObserver:forKeyPath:
(id) - replacementObjectForArchiver:
(id) - replacementObjectForCoder:
(id) - replacementObjectForKeyedArchiver:
(BOOL) - respondsToSelector:
(id) - retain
(id) - self
(void) - setValue:forKey:
(void) - setValue:forKeyPath:
(void) - setValue:forUndefinedKey:
(void) - setValuesForKeysWithDictionary:
(CPString- UID
(void) - unbind:
(Class) - valueClassForBinding:
(id) - valueForKey:
(id) - valueForKeyPath:
(id) - valueForUndefinedKey:
(void) - willChange:valuesAtIndexes:forKey:
(void) - willChangeValueForKey:
(void) - willChangeValueForKey:withSetMutation:usingObjects:

Class Methods

(CPOperationQueue+ currentQueue
(CPOperationQueue+ mainQueue
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
(id) + alloc
(id) + allocWithCoder:
(BOOL) + automaticallyNotifiesObserversForKey:
(void) + cancelPreviousPerformRequestsWithTarget:
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
(Class) + class
(BOOL) + conformsToProtocol:
(void) + exposeBinding:
(void) + initialize
(IMP) + instanceMethodForSelector:
(BOOL) + instancesImplementSelector:
(BOOL) + instancesRespondToSelector:
(BOOL) + isBindingExclusive:
(BOOL) + isSubclassOfClass:
(CPSet) + keyPathsForValuesAffectingValueForKey:
(void) + load
(id) + new
(void) + object:performSelector:withObject:afterDelay:inModes:
(void) + setVersion:
(Class) + superclass
(int) + version

Detailed Description

Represents an operation queue that can run CPOperations.

Definition at line 2 of file CPOperationQueue.h.

Method Documentation

◆ addOperation:()

- (void) addOperation: (CPOperation anOperation

Adds the specified operation object to the receiver.

anOperationthe operation that should be scheduled for execution

Definition at line 100 of file CPOperationQueue.j.

◆ addOperations:waitUntilFinished:()

- (void) addOperations: (CPArray)  ops
waitUntilFinished: (BOOL)  wait 

Adds the specified array of operations to the queue.

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 115 of file CPOperationQueue.j.

◆ addOperationWithFunction:()

- (void) addOperationWithFunction: (JSObject)  aFunction

Wraps the given js function in a CPOperation and adds it to the queue

aFunctionthe JS function to add

Definition at line 134 of file CPOperationQueue.j.

◆ cancelAllOperations()

- (void) cancelAllOperations

Cancels all queued and executing operations.

Definition at line 157 of file CPOperationQueue.j.

◆ currentQueue()

+ (CPOperationQueue) currentQueue

Convenience method for one system wide singleton queue. Returns the same queue as mainQueue.

Definition at line 291 of file CPOperationQueue.j.

◆ init()

- (id) init

Initializes the receiver

the initialized receiver

Reimplemented from CPObject.

Definition at line 37 of file CPOperationQueue.j.

◆ isSuspended()

- (BOOL) isSuspended

Returns a Boolean value indicating whether the receiver is scheduling queued operations for execution.

Definition at line 208 of file CPOperationQueue.j.

◆ mainQueue()

+ (CPOperationQueue) mainQueue

Convenience method for one system wide singleton queue. Returns the same queue as currentQueue.

Definition at line 277 of file CPOperationQueue.j.

◆ maxConcurrentOperationCount()

- (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 190 of file CPOperationQueue.j.

◆ name()

- (CPString) name

Synthesized accessor method.

Provided by category CPOperationQueue(CPSynthesizedAccessors).

Definition at line 303 of file CPOperationQueue.j.

◆ operationCount()

- (int) operationCount

Definition at line 144 of file CPOperationQueue.j.

◆ operations()

- (CPArray) operations

Definition at line 139 of file CPOperationQueue.j.

◆ setName:()

- (void) setName: (CPString aValue

Synthesized accessor method.

Provided by category CPOperationQueue(CPSynthesizedAccessors).

Definition at line 311 of file CPOperationQueue.j.

◆ setSuspended:()

- (void) setSuspended: (BOOL)  suspend

Modifies the execution of pending operations

suspendif YES, queue execution is suspended. If NO, it is resumed

Definition at line 199 of file CPOperationQueue.j.

◆ waitUntilAllOperationsAreFinished()

- (void) waitUntilAllOperationsAreFinished

Blocks until all of the receiver’s queued and executing operations finish executing.

Definition at line 174 of file CPOperationQueue.j.

The documentation for this class was generated from the following files: