19 OF_ASSUME_NONNULL_BEGIN
31 @class OFList OF_GENERIC(ObjectType);
33 @class OFThreadPoolJob;
51 volatile int _doneCount;
71 + (instancetype)threadPoolWithSize: (
size_t)
size;
80 - initWithSize: (size_t)
size OF_DESIGNATED_INITIALIZER;
90 - (void)dispatchWithTarget: (
id)target
91 selector: (SEL)selector
92 object: (nullable
id)object;
116 OF_ASSUME_NONNULL_END
void(^ of_thread_pool_block_t)(void)
A block for a job which should be executed in a thread pool.
Definition: OFThreadPool.h:27
void waitUntilDone()
Waits until all jobs are done.
Definition: OFThreadPool.m:312
instancetype threadPool()
Returns a new thread pool with one thread for each core in the system.
Definition: OFThreadPool.m:221
size_t size()
Returns the size of the thread pool.
Definition: OFThreadPool.m:353
The root class for all other classes inside ObjFW.
Definition: OFObject.h:379
A class providing a pool of reusable threads.
Definition: OFThreadPool.h:43
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:40
A class which provides easy to use double-linked lists.
Definition: OFList.h:47
A class implementing a condition variable for thread synchronization.
Definition: OFCondition.h:28