preCICE
Loading...
Searching...
No Matches
SocketRequest.cpp
Go to the documentation of this file.
1#include "SocketRequest.hpp"
2
3namespace precice::com {
4
6{
7 {
8 std::lock_guard<std::mutex> lock(_completeMutex);
9
10 _complete = true;
11 }
12
13 _completeCondition.notify_one();
14}
15
17{
18 std::lock_guard<std::mutex> lock(_completeMutex);
19
20 return _complete;
21}
22
24{
25 std::unique_lock<std::mutex> lock(_completeMutex);
26
27 // Lock is acquired when the predicate is evaluated.
28 _completeCondition.wait(lock, [this] { return _complete; });
29}
30} // namespace precice::com
std::condition_variable _completeCondition
contains the data communication abstraction layer.