|
Objectively
Object oriented framework for C.
|
Go to the source code of this file.
Data Structures | |
| struct | ThreadPoolWork |
| An opaque handle to a ThreadFunction submitted with ThreadPool::execute. More... | |
Macros | |
| #define | _Class _ThreadPool |
Enumerations | |
| enum | ThreadPoolWorkState { ThreadPoolWorkPending , ThreadPoolWorkRunning , ThreadPoolWorkFinished } |
| The states of a ThreadPoolWork. More... | |
Functions | |
| Class * | _ThreadPool (void) |
| static ident | _wait (ThreadPool *self, ThreadPoolWork *work) |
| static Object * | copy (const Object *self) |
| static void | dealloc (Object *self) |
| static void | dequeue (ThreadPool *self, ThreadPoolWork *work) |
Removes work from the queue. | |
| static void | detach (ThreadPool *self, ThreadFunction function, ident data) |
| static ThreadPoolWork * | execute (ThreadPool *self, ThreadFunction function, ident data) |
| static ThreadPool * | init (ThreadPool *self) |
| static void | initialize (Class *clazz) |
| static ThreadPool * | initWithSize (ThreadPool *self, size_t size) |
| static ident | run (Thread *thread) |
| ThreadFunction for the ThreadPool Threads. | |
| static void | runOnCallingThread (ThreadPoolWork *work) |
Runs work on the calling thread, with a Thread that is never started. | |
| static ThreadPoolWork * | submit (ThreadPool *self, ThreadFunction function, ident data, bool isDetached) |
Queues function, or runs it on the calling thread if this ThreadPool has no Threads. | |
| #define _Class _ThreadPool |
Definition at line 39 of file ThreadPool.c.
| enum ThreadPoolWorkState |
The states of a ThreadPoolWork.
| Enumerator | |
|---|---|
| ThreadPoolWorkPending | |
| ThreadPoolWorkRunning | |
| ThreadPoolWorkFinished | |
Definition at line 44 of file ThreadPool.c.
| Class * _ThreadPool | ( | void | ) |
Definition at line 375 of file ThreadPool.c.
|
static |
Definition at line 321 of file ThreadPool.c.
Definition at line 92 of file ThreadPool.c.
|
static |
Definition at line 99 of file ThreadPool.c.
|
static |
Removes work from the queue.
Definition at line 218 of file ThreadPool.c.
|
static |
Definition at line 184 of file ThreadPool.c.
|
static |
Definition at line 192 of file ThreadPool.c.
|
static |
Definition at line 200 of file ThreadPool.c.
|
static |
Definition at line 359 of file ThreadPool.c.
|
static |
Definition at line 290 of file ThreadPool.c.
ThreadFunction for the ThreadPool Threads.
thread->data is the user data of the current ThreadPoolWork, so the ThreadPool is kept in a local. Definition at line 244 of file ThreadPool.c.
|
static |
Runs work on the calling thread, with a Thread that is never started.
Definition at line 130 of file ThreadPool.c.
|
static |
Queues function, or runs it on the calling thread if this ThreadPool has no Threads.
NULL if isDetached. Definition at line 145 of file ThreadPool.c.