dlib.core.thread

Cross-platform thread class. Supports Windows and Posix

Description: This module provides a platform-independent multithreading API. For now, it supports Windows and Posix threads (pthreads). The interface is greatly inspired by core.thread from Phobos, but dlib.core.thread is fully GC-free and can be used with dlib.core.memory allocators.

Implementation notes:

- No TLS support, sorry. Any global variables should be marked with __gshared for correct access from threads.

- Internals of Thread class are platform-dependent, so be aware of that when inheriting.

Members

Aliases

LPTHREAD_START_ROUTINE
alias LPTHREAD_START_ROUTINE = uint function(in void*)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.

Classes

Thread
class Thread

Base class for creating threads

Functions

CloseHandle
int CloseHandle(void* hObject)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateThread
void* CreateThread(SECURITY_ATTRIBUTES* lpThreadAttributes, size_t dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, void* lpParameter, uint dwCreationFlags, uint* lpThreadId)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
GetExitCodeThread
int GetExitCodeThread(void* hThread, uint* lpExitCode)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
TerminateThread
int TerminateThread(void* hThread, uint dwExitCode)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
WaitForMultipleObjects
uint WaitForMultipleObjects(uint nCount, void** lpHandles, int bWaitAll, uint dwMilliseconds)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.

Manifest constants

INFINITE
enum INFINITE;
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
STILL_ACTIVE
enum STILL_ACTIVE;
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.

Structs

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

Meta

Authors

Timur Gafarov