Threads module
This module supports threading using the "pthread" library.
Data types
- Threads::Mutex - A Mutex.
- Threads::Thread<rettype> - A thread.
Functions
- Thread<b> create(b() fn) - Create a thread.
- Thread<b> create(b(a) fn,a arg) - Create a thread.
- Void end() - Terminate the current thread.
- Void kill(Thread<rettype> id) - Kill a thread immediately
- Void lock(Mutex m) - Lock a mutex.
- Mutex mutex() - Create a mutex.
- Void unlock(Mutex m) - Unlock a mutex.
- rettype waitFor(Thread<rettype> id) - Wait for a thread to terminate.