Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOAsyncWorkManager.m File Reference
import "OOAsyncWorkManager.h"
import "OOAsyncQueue.h"
import "OOCPUInfo.h"
import "OOCollectionExtractors.h"
import "NSThreadOOExtensions.h"
import "OONSOperation.h"
#include <pthread.h>
+ Include dependency graph for OOAsyncWorkManager.m:

Go to the source code of this file.

Classes

category  NSThread(MethodsThatMayExistDependingOnSystem)
 
class  OOAsyncWorkManagerInternal
 
class  OOOperationQueueAsyncWorkManager
 

Macros

#define USE_PTHREAD_ONCE   (!OOLITE_WINDOWS)
 

Enumerations

enum  { kMaxWorkThreads = 8 }
 

Functions

static void InitAsyncWorkManager (void)
 

Variables

static OOAsyncWorkManagersSingleton = nil
 

Macro Definition Documentation

◆ USE_PTHREAD_ONCE

#define USE_PTHREAD_ONCE   (!OOLITE_WINDOWS)

Definition at line 35 of file OOAsyncWorkManager.m.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMaxWorkThreads 

Definition at line 321 of file OOAsyncWorkManager.m.

322{
324};
@ kMaxWorkThreads

Function Documentation

◆ InitAsyncWorkManager()

static void InitAsyncWorkManager ( void )
static

Definition at line 105 of file OOAsyncWorkManager.m.

106{
107 NSCAssert(sSingleton == nil, @"Async Work Manager singleton not nil in one-time init");
108
109#if !OO_HAVE_NSOPERATION
110 if ([OOOperationQueueAsyncWorkManager canBeUsed])
111 {
113 }
114 if (sSingleton == nil)
115 {
116 sSingleton = [[OOManualDispatchAsyncWorkManager alloc] init];
117 }
118#else
120#endif
121
122 if (sSingleton == nil)
123 {
124 OOLog(@"asyncWorkManager.setUpDispatcher.failed", @"%@", @"***** FATAL ERROR: could not set up async work manager!");
125 exit(EXIT_FAILURE);
126 }
127
128 OOLog(@"asyncWorkManager.dispatchMethod", @"Selected async work manager: %@", [sSingleton class]);
129}
static OOAsyncWorkManager * sSingleton
#define OOLog(class, format,...)
Definition OOLogging.h:88
return nil

Variable Documentation

◆ sSingleton

OOAsyncWorkManager* sSingleton = nil
static