Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li><code>boost::condition_variable</code> anticipate <code>std::condition_variable</code> of C++11. As of today (2011) is implemented fully on POSIX interfaced systems (like UNIX / LINUX) but only mimicked on windows (with partial support)</li> <li>windows CONDITION_VARAIBLE is the "hardware" that is needded to implement <code>std::condition_varable</code> in windows with full support. But exists only from win6 (Vista and 2008). The world is still poulated by a lot of XP (that's why mingw -pthread is not supported in windows).</li> <li>Winapi evvent objects (see CreateEvent) can mimic a posix condition variable but are not exactly the same (in POSIX a condition variable can be used to weak up just one or all, case by case. in Windows, an Event is created to be automatic (and if signaled wake-up one thread and autoresets) or manual (and if signaled weak up everything waits for it until it will remain signaled. Reset must be manual) and cannot change behavior case by case.</li> <li>Forgot signal &amp; slots: their purpose is not "weak up a waiting thread when something happens". They are just a completely different (an unrelated) concept.</li> <li>CriticalSection is the "single process" version for the more general Mutex (that is the same for windows and POSIX, with the difference that Windows does not distinguish between recursive and non-recursive: all are recursive).</li> </ol> <p>That said, behind events (and condition variable) and mutex (and critical sections) there is a different scope of work: </p> <p>Mutexes -essentially- protect code that must not be run concurrently. They essentially means "if this piece of code is already in execution wait until the other will complete it". </p> <p>Events -essentially- protect the access to resource not yet been produced. It essentially means "wait here until someone can grant that it is possible to go over".</p> <p>The difference is that mutexes are signaled by the same who has unsignaled them, while events are unsignaled by the one that had been waked-up from who signaled them. Note the the term "signal", here, has noting to do with the notion of signal in "boost signal", that is much more related to the concept of "delegate chain". But it is all another story.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload