Coimplete operation queue implementation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29508 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-02-08 10:34:27 +00:00
parent 0dec7f1b97
commit 6c84f23ae1
4 changed files with 292 additions and 56 deletions

View file

@ -191,11 +191,30 @@ enum {
@private
id _internal;
}
#if OS_API_VERSION(100600, GS_API_LATEST)
/** If called from within the -main method of an operation which is
* currently being executed by a queue, this returns the queue instance
* in use.
*/
+ (id) currentQueue;
/** Returns the default queue on the main thread.
*/
+ (id) mainQueue;
#endif
/** Adds an operation to the receiver.
*/
- (void) addOperation: (NSOperation *)op;
#if OS_API_VERSION(100600, GS_API_LATEST)
/** Adds multiple operations to the receiver and (optionally) waits for
* all the operations in the queue to finish.
*/
- (void) addOperations: (NSArray *)ops
waitUntilFinished: (BOOL)shouldWait;
#endif
/** Cancels all outstanding operations in the queue.
*/
- (void) cancelAllOperations;