Suchergebnisse für Anfrage "condition-variable"
Warum gibt es keine Wartefunktion für condition_variable, die den Mutex nicht erneut sperrt
Betrachten Sie das folgende Beispiel. std::mutex mtx; std::condition_variable cv; void f() { { std::unique_lock<std::mutex> lock( mtx ); cv.wait( lock ); // 1 } std::cout << "f()\n"; } void g() { std::this_thread::sleep_for( 1s ); ...
Seite 2 von 2