Tech/LxEngine/Threading
From Athile
This page is a stub.
Contents |
Overview
The LxEngine threading library aims to provide minimal set of functionality necessary for most applications to efficiently support multiple threads. Due the complexity of correct multi-threading, a special emphasis has been placed on minizing the Lx threading vocabulary to ensure it can be learned correctly and completely.
Threads
lx::thread::thread
- wait ()
- wait (condition)
- wait_any (condition[])
- wait_all (condition[])
- resume()
Critical Sections
lx::thread::critical_section
- lock()
- unlock()
Condition Variables
lx::thread::condition
A state variable. Will resume any thread waiting for a particular status on the condition when set to that status.
- .ctor (int status)
- set (int status)
Utilities
Thread-Safe Queue
Provides a thread-safe container similar to std::deque<> that also provides condition variables for signalling empty/not-empty state changes.
Use Cases
- Inter-thread messaging queues