The just::thread library is a complete implementation
of the C++11 Standard Thread Library, providing facilities for using threads,
synchronizing and communicating between them.
Features include:
- Tight adherence to the C++11 Standard.
-
std::threadclass for launching and managing threads. (See the <thread> Header.) -
Mutex classes (
std::mutex,std::timed_mutex, etc.) for protecting shared data, and lock ownership wrapper classes (std::lock_guard,std::unique_lock) for ensuring safe release of mutex locks. (See the <mutex> Header.) -
Generic lock functions (
std::lock,std::try_lock) for locking multiple mutexes at once without deadlock. (See the <mutex> Header.) -
Condition variables (
std::condition_variableandstd::condition_variable_any) for synchronizing operations. (See the <condition_variable> header.) -
Atomic types (
std::atomic<int>,std::atomic<void*>, etc.) for low level atomic access. (See the <atomic> Header.) -
Futures and promises (
std::future,std::promise, etc.) for communicating data between threads. (See the <future> Header.) -
thread_localemulation, including support for types with constructors and destructors (seeJSS_THREAD_LOCAL). - Compatible with Microsoft Visual Studio 2005, Microsoft Visual Studio 2008, Microsoft Visual C++ Express 2008, Microsoft Visual Studio 2010 and Microsoft Visual C++ Express 2010 for 32-bit and 64-bit Windows targets.
- Compatible with g++ 4.3, 4.4, 4.5 and 4.6 for 32-bit and 64-bit linux targets, g++ 4.5 and 4.6 for 32-bit and 64-bit Windows targets, and g++ 4.3, 4.4 and 4.5 for 32-bit MacOSX targets.
- Special debug mode for identifying the call chain leading to a deadlock.