Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Dead_Lock
//Title of this code #include <iostream> #include <thread> #include <mutex> using namespace std; int main() { std::mutex g_mutex; std::thread t1([&g_mutex]()->void{ std::lock_guard<std::mutex> lock1(g_mutex); std::thread t2([&g_mutex]()->void { std::lock_guard<std::mutex> lock2(g_mutex); cout << "This Cann't be executed forever!!!" << endl; }); t2.join(); }); t1.join(); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Loop comparison
PayTax
Dar
Listas enlazadas - dividir lista en dos reutilizando nodos
temporaries and move constructor
co_assign_1_ques_1
Kalkulator z bajerami
prime factorization trial division
motores
410
Please log in to post a comment.