Tech/LxEngine/Threading

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

 * wait
 * wait (condition)
 * wait_any (condition[])
 * wait_all (condition[])
 * resume

Critical Sections

 * lock
 * unlock

Condition Variables
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)

Thread-Safe Queue
Provides a thread-safe container similar to that also provides condition variables for signalling empty/not-empty state changes.

Use Cases

 * Inter-thread messaging queues