mmutils.thread_pool

Undocumented in source.

Public Imports

core.atomic
public import core.atomic;
Undocumented in source.

Members

Aliases

JobDelegate
alias JobDelegate = void delegate(ThreadData*, JobData*)
Undocumented in source.
btex_fptr
alias btex_fptr = uint function(void*)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
clockid_t
alias clockid_t = int

/////////////////////////////////////////// ///////////////// Timer /////////////////// ///////////////////////////////////////////

sem_t
alias sem_t = void*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
time_t
alias time_t = int

/////////////////////////////////////////// ///////////////// Timer /////////////////// ///////////////////////////////////////////

time_t
alias time_t = uint
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Enums

MemoryOrder
enum MemoryOrder

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

Functions

_beginthreadex
uintptr_t _beginthreadex(void* , uint , btex_fptr , void* , uint , uint* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
atomicLoad
T atomicLoad(T val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

atomicOp
Unqual!T atomicOp(T val, V1 mod)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

atomicStore
void atomicStore(T val, V newval)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

cas
bool cas(T* here, V1 ifThis, V2 writeThis)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

clock_gettime
int clock_gettime(clockid_t , timespec* )

/////////////////////////////////////////// ///////////////// Timer /////////////////// ///////////////////////////////////////////

disposeArray
void disposeArray(T[] var)
Undocumented in source. Be warned that the author may not have intended to support it.
disposeVar
void disposeVar(T* var)
Undocumented in source. Be warned that the author may not have intended to support it.
emscripten_atomic_add_u16
ushort emscripten_atomic_add_u16(void* addr, ushort val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_add_u32
uint emscripten_atomic_add_u32(void* addr, uint val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_add_u8
ubyte emscripten_atomic_add_u8(void* addr, ubyte val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_cas_u16
ushort emscripten_atomic_cas_u16(void* addr, ushort oldVal, ushort newVal)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_cas_u32
uint emscripten_atomic_cas_u32(void* addr, uint oldVal, uint newVal)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_cas_u8
ubyte emscripten_atomic_cas_u8(void* addr, ubyte oldVal, ubyte newVal)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_load_u16
ushort emscripten_atomic_load_u16(void* addr)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_load_u32
uint emscripten_atomic_load_u32(void* addr)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_load_u8
ubyte emscripten_atomic_load_u8(void* addr)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_store_u16
ushort emscripten_atomic_store_u16(void* addr, ushort val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_store_u32
uint emscripten_atomic_store_u32(void* addr, uint val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_store_u8
ubyte emscripten_atomic_store_u8(void* addr, ubyte val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_sub_u16
ushort emscripten_atomic_sub_u16(void* addr, ushort val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_sub_u32
uint emscripten_atomic_sub_u32(void* addr, uint val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_atomic_sub_u8
ubyte emscripten_atomic_sub_u8(void* addr, ubyte val)

/////////////////////////////////////////// //////////// Atomics ////////////////////// ///////////////////////////////////////////

emscripten_get_now
double emscripten_get_now()

/////////////////////////////////////////// ///////////////// Timer /////////////////// ///////////////////////////////////////////

free
void free(void* )

/////////////////////////////////////////// //////////// BetterC Support ////////////// ///////////////////////////////////////////

instructionPause
void instructionPause()

/////////////////////////////////////////// ///////////////// Pause /////////////////// ///////////////////////////////////////////

makeVar
T* makeVar(T init)

/////////////////////////////////////////////// ///////////////// Allocator /////////////////// ///////////////////////////////////////////////

makeVar
T* makeVar()
Undocumented in source. Be warned that the author may not have intended to support it.
makeVarArray
T[] makeVarArray(int num, T init)
Undocumented in source. Be warned that the author may not have intended to support it.
malloc
void* malloc(size_t size)

/////////////////////////////////////////// //////////// BetterC Support ////////////// ///////////////////////////////////////////

memcpy
void* memcpy(void* , void* , size_t size)

/////////////////////////////////////////// //////////// BetterC Support ////////////// ///////////////////////////////////////////

pthread_create
int pthread_create(pthread_t* , pthread_attr_t* , void* function(void*) , void* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_create
int pthread_create(pthread_t* , pthread_attr_t* , void* function(void*) , void* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_exit
void pthread_exit(void* retval)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_exit
void pthread_exit(void* retval)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_join
int pthread_join(pthread_t , void** )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_join
int pthread_join(pthread_t , void** )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
realloc
void* realloc(void* , size_t size)

/////////////////////////////////////////// //////////// BetterC Support ////////////// ///////////////////////////////////////////

sem_destroy
int sem_destroy(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_destroy
int sem_destroy(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_init
int sem_init(sem_t* , int , uint )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_init
int sem_init(sem_t* , int , uint )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_post
int sem_post(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_post
int sem_post(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_timedwait
int sem_timedwait(sem_t* sem, timespec* abstime)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_timedwait
int sem_timedwait(sem_t* sem, timespec* abstime)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_trywait
int sem_trywait(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_trywait
int sem_trywait(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_wait
int sem_wait(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_wait
int sem_wait(sem_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
useconds
long useconds()

High precison timer

Manifest constants

CLOCK_REALTIME
enum CLOCK_REALTIME;
Undocumented in source.

Structs

FILE
struct FILE
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
JobData
struct JobData

Structure containing job data JobData memory is allocated by user JobData lifetime is managed by user JobData has to live as long as it's group or end of job execution JobData fields can be changed in del delegate and job can be added to thread pool again, to continue execution (call same function again or another if del was changed)

JobLog
struct JobLog
Undocumented in source.
JobQueue
struct JobQueue

First in first out queue with atomic lock

JobsGroup
struct JobsGroup

Adding groups of jobs is faster and groups can have dependencies between each other

Semaphore
struct Semaphore

/////////////////////////////////////////// ////////// Semaphore + Thread ///////////// ///////////////////////////////////////////

Semaphore
struct Semaphore
Undocumented in source.
Semaphore
struct Semaphore
Undocumented in source.
Thread
struct Thread

/////////////////////////////////////////// ////////// Semaphore + Thread ///////////// ///////////////////////////////////////////

Thread
struct Thread
Undocumented in source.
Thread
struct Thread
Undocumented in source.
ThreadData
struct ThreadData

Structure responsible for thread in thread pool Stores jobs to be executed by this thread (jobs can be stolen by another thread) Stores cache for logs

ThreadPool
struct ThreadPool

Thread Pool Manages bounch of threads to execute given jobs as quickly as possible There are no priorities beetween jobs. Jobs added to queues in same order as they are in slices, but due to job stealing and uneven speed of execution beetween threads jobs execution order is unspecified. Number of threads executing jobs can be dynamically changed in any time. Threads removed from execution will work until the end of the program but shouldn't accept new jobs.

pthread_attr_t
struct pthread_attr_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_attr_t
struct pthread_attr_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_t
struct pthread_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
pthread_t
struct pthread_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sem_t
struct sem_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
timespec
struct timespec

/////////////////////////////////////////// ///////////////// Timer /////////////////// ///////////////////////////////////////////

timespec
struct timespec
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta