dplug.core.thread

Threads and thread-pool.

Members

Classes

ThreadPool
class ThreadPool

Rewrite of the ThreadPool using condition variables. FUTURE: this could be speed-up by using futures. Description of the task and associated condition+mutex would go in an external struct. Note: the interface of the thread-pool itself is not thread-safe, you cannot give orders from multiple threads at once.

Functions

currentThreadId
void* currentThreadId()
currentThreadId
void* currentThreadId()
getTotalNumberOfCPUs
int getTotalNumberOfCPUs()
launchInAThread
Thread launchInAThread(ThreadDelegate dg)

Launch a function in a newly created thread, which is destroyed afterwards. Return the thread so that you can call .join() on it.

Structs

Thread
struct Thread

Optimistic thread, failure not supported

Meta

License

Distributed under the Boost Software License 1.0. (See accompanying file LICENSE)

Authors

Sean Kelly, Walter Bright, Alex Rønne Petersen, Martin Nowak, David Simcha, Guillaume Piolat