27OF_ASSUME_NONNULL_BEGIN
38#if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS)
70 OFPlainThread _thread;
71 OFPlainThreadAttributes _attr;
73 OFThreadStateNotRunning,
75 OFThreadStateWaitingForJoin
77# ifndef OF_OBJFW_RUNTIME
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
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;
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;
double OFTimeInterval
A time interval in seconds.
Definition OFObject.h:154
id(^ OFThreadBlock)(void)
A block to be executed in a new thread.
Definition OFThread.h:44
A class for resolving DNS names.
Definition OFDNSResolver.h:132
A class for storing, accessing and comparing dates.
Definition OFDate.h:34
An abstract class for storing and changing objects in a dictionary.
Definition OFMutableDictionary.h:48
The root class for all other classes inside ObjFW.
Definition OFObject.h:692
A class providing a run loop for the application and its processes.
Definition OFRunLoop.h:66
A class for handling strings.
Definition OFString.h:143
A class which provides portable threads.
Definition OFThread.h:66
OFString * name
The name for the thread to use when starting it.
Definition OFThread.h:119
OFThreadBlock block
The block to execute in the thread.
Definition OFThread.h:125
A protocol for the creation of copies.
Definition OFObject.h:1350