Jerry's Tutorials: Boost Condition Variables for C++ Programming, 1 of 2

Jerry's Tutorials: Boost Condition Variables for C++ Programming, 1 of 2


  • Sometimes things are not called what they are, but a condition variable really is a variable.  Namely, a condition variable is instantiated as an object of type boost::condition_variable.
    boost::condition_variable tttt;  // must have "global" scope
  • A condition variable does not literally have to have global scope, but its scope must be available to all threads that are using it and its scope must persist until all threads that are using it are completed.  In other word, the scope requirements for a condition variable are usually identical to the scope requirements for a mutex.

Return to Jerry's Home Page

This page last edited on 26 Mar 2016.