74 JSObject _completionFunction;
75 CPArray _dependencies;
93 _dependencies = [[CPArray alloc] init];
110 if (_completionFunction)
112 _completionFunction();
173 - (JSObject)completionFunction
175 return _completionFunction;
181 - (void)setCompletionFunction:(JSObject)aJavaScriptFunction
183 _completionFunction = aJavaScriptFunction;
195 options:(CPKeyValueObservingOptionNew)
197 [_dependencies addObject:anOperation];
199 [
self _updateIsReadyState];
209 [_dependencies removeObject:anOperation];
213 [
self _updateIsReadyState];
220 - (CPArray)dependencies
222 return _dependencies;
228 - (void)waitUntilFinished
246 - (void)setQueuePriority:(
int)priority
248 _queuePriority = priority;
257 return _queuePriority;
264 context:(
void)context
266 if (keyPath ==
@"isFinished")
268 [
self _updateIsReadyState];
272 - (void)_updateIsReadyState
275 if (_dependencies && [_dependencies count] > 0)
278 for (i = 0; i < [_dependencies count]; i++)
280 if (![[_dependencies objectAtIndex:i] isFinished])
287 if (newReady != _ready)
289 [
self willChangeValueForKey:@"isReady"];
291 [
self didChangeValueForKey:@"isReady"];
void willChangeValueForKey:(CPString aKey)
CPOperationQueuePriorityVeryHigh
global CPKeyValueObservingOptionNew CPOperationQueuePriorityVeryLow
A mutable key-value pair collection.
An immutable string (collection of characters).
void addObserver:forKeyPath:options:context:(id anObserver, [forKeyPath] CPString aPath, [options] CPKeyValueObservingOptions options, [context] id aContext)
CPOperationQueuePriorityLow
CPKeyValueObservingOptionNew
void didChangeValueForKey:(CPString aKey)
Represents an operation that can be run in an CPOperationQueue.
void removeObserver:forKeyPath:(id anObserver, [forKeyPath] CPString aPath)
FrameUpdater prototype start
CPOperationQueuePriorityNormal
CPOperationQueuePriorityHigh