Threads

In many environments, multi-threaded code is written in a language that was originally designed without thread support (e.g. C), to which a library of threading primitives was subsequently added. There appears to be a general understanding that this is not the right approach. We provide specific arguments that a pure library approach, in which the compiler is designed independently of threading issues, cannot guarantee correctness of the resulting code. - Cannot Be Implemented As a Library (Boehm)

C++

“Effort to revise the C++ language standard to better accommodate threads” was eventually achieved in C++11, which uses a separate type for atomic variables (std::atomic) rather than relying on volatile, and has a formal memory model with a variety of memory orderings of different strengths (relaxed, acquire/release, sequentially consistent). - [HN]

Quote About Thread

The strongest evidence of a golden hammer is a lot of red thumbs. - HN

See also:

  • The Deadlock Empire / HN - Your objective is to exploit flaws in the programs to make them crash or otherwise malfunction.
Written on November 23, 2018, Last update on December 3, 2021
thread c++ lib