Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOOperationQueueAsyncWorkManager Class Reference
+ Inheritance diagram for OOOperationQueueAsyncWorkManager:
+ Collaboration diagram for OOOperationQueueAsyncWorkManager:

Instance Methods

(void) - dispatchTask:
 
(id) - init [implementation]
 
(void) - dealloc [implementation]
 
(BOOL) - addTask:priority: [implementation]
 
- Instance Methods inherited from OOAsyncWorkManagerInternal
(void) - queueResult:
 
(void) - noteTaskQueued:
 
(void) - completePendingTasks [implementation]
 
(void) - waitForTaskToComplete: [implementation]
 
- Instance Methods inherited from OOAsyncWorkManager
(oneway void) - release [implementation]
 
(id) - retain [implementation]
 
(NSUInteger) - retainCount [implementation]
 

Private Attributes

OONSOperationQueue _operationQueue
 

Additional Inherited Members

- Class Methods inherited from OOAsyncWorkManager
(OOAsyncWorkManager *) + sharedAsyncWorkManager
 
(id) + allocWithZone: [implementation]
 

Detailed Description

Definition at line 85 of file OOAsyncWorkManager.m.

Method Documentation

◆ addTask:priority:

- (BOOL) addTask: (id<OOAsyncWorkTask>) task
priority: (OOAsyncWorkPriority) priority 
implementation

Reimplemented from OOAsyncWorkManager.

Definition at line 88 of file OOAsyncWorkManager.m.

440 :(id<OOAsyncWorkTask>)task priority:(OOAsyncWorkPriority)priority
441{
442 if (EXPECT_NOT(task == nil)) return NO;
443
444 id operation = [[OONSInvocationOperationClass() alloc] initWithTarget:self selector:@selector(dispatchTask:) object:task];
445 if (operation == nil) return NO;
446
447 if (priority == kOOAsyncPriorityLow) [operation setQueuePriority:OONSOperationQueuePriorityLow];
448 else if (priority == kOOAsyncPriorityHigh) [operation setQueuePriority:OONSOperationQueuePriorityHigh];
449
450 [_operationQueue addOperation:operation];
451 [operation release];
452
453 [super noteTaskQueued:task];
454 return YES;
455}
OOAsyncWorkPriority
@ kOOAsyncPriorityLow
@ kOOAsyncPriorityHigh
#define EXPECT_NOT(x)
@ OONSOperationQueuePriorityLow
@ OONSOperationQueuePriorityHigh
return nil

◆ dealloc

- (void) dealloc
implementation

Reimplemented from OOAsyncWorkManager.

Definition at line 88 of file OOAsyncWorkManager.m.

433{
434 [_operationQueue release];
435
436 [super dealloc];
437}

◆ dispatchTask:

- (void) dispatchTask: (id<OOAsyncWorkTask>) task

Definition at line 88 of file OOAsyncWorkManager.m.

458 :(id<OOAsyncWorkTask>)task
459{
460 @try
461 {
462 [task performAsyncTask];
463 }
464 @catch (id exception) {}
465 [self queueResult:task];
466}

◆ init

- (id) init
implementation

Reimplemented from OOAsyncWorkManagerInternal.

Definition at line 88 of file OOAsyncWorkManager.m.

416{
417 if ((self = [super init]))
418 {
419 _operationQueue = [[OONSOperationQueueClass() alloc] init];
420
421 if (_operationQueue == nil)
422 {
423 [self release];
424 return nil;
425 }
426 }
427
428 return self;
429}

Member Data Documentation

◆ _operationQueue

- (OONSOperationQueue) _operationQueue
private

Definition at line 88 of file OOAsyncWorkManager.m.


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