19 #ifdef OF_HAVE_THREADS
20 # import "threading.h"
23 OF_ASSUME_NONNULL_BEGIN
31 #if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS)
54 #ifdef OF_HAVE_THREADS
63 of_thread_attr_t _attr;
65 OF_THREAD_NOT_RUNNING,
67 OF_THREAD_WAITING_FOR_JOIN
70 # ifdef OF_HAVE_BLOCKS
80 # ifdef OF_HAVE_PROPERTIES
81 # ifdef OF_HAVE_BLOCKS
85 @property float priority;
86 @property size_t stackSize;
94 + (instancetype)thread;
96 # ifdef OF_HAVE_BLOCKS
142 + (void)sleepUntilDate: (
OFDate*)date;
150 #ifdef OF_HAVE_THREADS
154 + (void)terminate OF_NO_RETURN;
161 + (void)terminateWithObject: (nullable
id)object OF_NO_RETURN;
163 # ifdef OF_HAVE_BLOCKS
189 - (void)handleTermination OF_REQUIRES_SUPER;
222 - (void)setName: (nullable
OFString*)name;
239 - (void)setPriority: (
float)priority;
255 - (void)setStackSize: (
size_t)stackSize;
259 OF_ASSUME_NONNULL_END
A class for storing, accessing and comparing dates.
Definition: OFDate.h:30
The root class for all other classes inside ObjFW.
Definition: OFObject.h:364
A class for handling strings.
Definition: OFString.h:91
A class which provides portable threads.
Definition: OFThread.h:53
id OF_NULLABLE(^ of_thread_block_t)(void)
A block to be executed in a new thread.
Definition: OFThread.h:37
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:47
A protocol for the creation of copies.
Definition: OFObject.h:896
A class providing a run loop for the application and its processes.
Definition: OFRunLoop.h:40
double of_time_interval_t
A time interval in seconds.
Definition: OFObject.h:90