Parallele Fäden und bedingte VariablenC++

Programme in C++. Entwicklerforum
Anonymous
 Parallele Fäden und bedingte Variablen

Post by Anonymous »

Ich bin ein bisschen verwirrt mit dem offiziellen Beispiel für eine bedingte Variable in C ++.#include
#include
#include
#include

std::condition_variable cv;
std::mutex cv_m; // This mutex is used for three purposes:
// 1) to synchronize accesses to i
// 2) to synchronize accesses to std::cerr
// 3) for the condition variable cv
int i = 0;

void waits()
{
std::unique_lock lk(cv_m);
std::cerr

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post