23 #ifdef OF_HAVE_THREADS 27 OF_ASSUME_NONNULL_BEGIN
32 #ifdef OF_HAVE_SOCKETS 38 #if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS) 66 #ifdef OF_HAVE_THREADS 70 OFPlainThread _thread;
71 OFPlainThreadAttributes _attr;
73 OFThreadStateNotRunning,
75 OFThreadStateWaitingForJoin
77 # ifndef OF_OBJFW_RUNTIME 80 # ifdef OF_HAVE_BLOCKS 85 bool _supportsSockets;
89 # ifdef OF_HAVE_SOCKETS 96 #ifdef OF_HAVE_CLASS_PROPERTIES 97 # ifdef OF_HAVE_THREADS 98 @property (
class, readonly, nullable, nonatomic)
OFThread *currentThread;
99 @property (
class, readonly, nullable, nonatomic)
OFThread *mainThread;
100 @property (
class, readonly, nonatomic)
bool isMainThread;
101 @property (
class, readonly, nullable, nonatomic)
103 @property (
class, nullable, copy, nonatomic)
OFString *name;
105 # ifdef OF_HAVE_SOCKETS 106 @property (
class, readonly, nonatomic)
OFDNSResolver *DNSResolver;
110 #ifdef OF_HAVE_THREADS 119 @property OF_NULLABLE_PROPERTY (copy)
OFString *name;
121 # ifdef OF_HAVE_BLOCKS 145 @property (nonatomic)
float priority;
155 @property (nonatomic)
size_t stackSize;
168 @property (nonatomic)
bool supportsSockets;
175 + (instancetype)thread;
177 # ifdef OF_HAVE_BLOCKS 192 + (nullable
OFThread *)currentThread;
206 + (bool)isMainThread;
217 #ifdef OF_HAVE_SOCKETS 242 + (void)sleepUntilDate: (
OFDate *)date;
250 #if defined(OF_WII) || defined(OF_NINTENDO_DS) || defined(OF_NINTENDO_3DS) || \ 257 + (void)waitForVerticalBlank;
260 #ifdef OF_HAVE_THREADS 264 + (void)terminate OF_NO_RETURN;
272 + (void)terminateWithObject: (nullable
id)object OF_NO_RETURN;
282 + (void)setName: (nullable
OFString *)name;
291 # ifdef OF_HAVE_BLOCKS 314 - (void)handleTermination OF_REQUIRES_SUPER;
332 - (instancetype)init OF_UNAVAILABLE;
336 OF_ASSUME_NONNULL_END
A class for storing, accessing and comparing dates.
Definition: OFDate.h:33
The root class for all other classes inside ObjFW.
Definition: OFObject.h:690
A class for handling strings.
Definition: OFString.h:142
id(^ OFThreadBlock)(void)
A block to be executed in a new thread.
Definition: OFThread.h:44
A class which provides portable threads.
Definition: OFThread.h:65
A class for resolving DNS names.
Definition: OFDNSResolver.h:131
double OFTimeInterval
A time interval in seconds.
Definition: OFObject.h:154
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:46
A protocol for the creation of copies.
Definition: OFObject.h:1350
A class providing a run loop for the application and its processes.
Definition: OFRunLoop.h:65