-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathZ_OldCodes.cpp
More file actions
31 lines (26 loc) · 790 Bytes
/
Copy pathZ_OldCodes.cpp
File metadata and controls
31 lines (26 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ********************************************************************************
/// <summary>
///
/// </summary>
/// <created>ʆϒʅ,01.12.2018</created>
/// <changed>ʆϒʅ,13.10.2019</changed>
// ********************************************************************************
#include "Packers.h"
#include "Z_OldCodes.h"
std::mutex MuTeX;
std::condition_variable conditionVariable;
bool ready;
void muTex ()
{
// set to wait till awakening signal is received
{
std::unique_lock<std::mutex> uniqueLock ( MuTeX );
conditionVariable.wait ( uniqueLock, [] { return ready; } );
}
// sending the awakening signal
{
std::unique_lock<std::mutex> uniqueLock ( MuTeX );
ready = true;
conditionVariable.notify_one ();
}
}