Objectively
Object oriented framework for C.
Loading...
Searching...
No Matches
ThreadPool.h File Reference

A fixed set of Threads that run ThreadFunctions on behalf of the caller. More...

Go to the source code of this file.

Data Structures

struct  ThreadPool
 A fixed set of Threads that run ThreadFunctions on behalf of the caller. More...
 

Functions

OBJECTIVELY_EXPORT Class * _ThreadPool (void)
 

Detailed Description

A fixed set of Threads that run ThreadFunctions on behalf of the caller.

Definition in file ThreadPool.h.

Function Documentation

◆ _ThreadPool()

OBJECTIVELY_EXPORT Class * _ThreadPool ( void  )

Definition at line 375 of file ThreadPool.c.

375 {
376 static Class *clazz;
377 static Once once;
378
379 do_once(&once, {
380 clazz = _initialize(&(const ClassDef) {
381 .name = "ThreadPool",
382 .superclass = _Object(),
383 .instanceSize = sizeof(ThreadPool),
384 .interfaceSize = sizeof(ThreadPoolInterface),
385 .initialize = initialize,
386 });
387 });
388
389 return clazz;
390}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition Class.c:151
Class * _Object(void)
Definition Object.c:136
static void initialize(Class *clazz)
Definition ThreadPool.c:359
long Once
The Once type.
Definition Once.h:37
#define do_once(once, block)
Executes the given block at most one time.
Definition Once.h:43
ClassDefs are passed to _initialize via an archetype to initialize a Class.
Definition Class.h:41
The runtime representation of a Class.
Definition Class.h:90
A fixed set of Threads that run ThreadFunctions on behalf of the caller.
Definition ThreadPool.h:64