diff options
author | crupest <crupest@outlook.com> | 2021-06-07 20:20:10 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-07 20:20:10 +0800 |
commit | bc0e9b6558b7737846699c41196433055f915aec (patch) | |
tree | 6922ae75da4feb22b88d6ed2e247593dfa178a0e /computer-network-experiment/Output.h | |
parent | 1b8ff04e64e054a061f157b9458cf7c73dba43a9 (diff) | |
download | life-bc0e9b6558b7737846699c41196433055f915aec.tar.gz life-bc0e9b6558b7737846699c41196433055f915aec.tar.bz2 life-bc0e9b6558b7737846699c41196433055f915aec.zip |
...
Diffstat (limited to 'computer-network-experiment/Output.h')
-rw-r--r-- | computer-network-experiment/Output.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/computer-network-experiment/Output.h b/computer-network-experiment/Output.h index 2d16eb0..689c3d3 100644 --- a/computer-network-experiment/Output.h +++ b/computer-network-experiment/Output.h @@ -8,6 +8,7 @@ #include <folly/MPMCQueue.h>
#include <iostream>
+#include <mutex>
#include <thread>
enum class OutputType { Normal, Error };
@@ -63,4 +64,4 @@ void OutputThread(); void SignalAndWaitForOutputThreadStop();
-extern std::thread output_thread;
+std::lock_guard<std::mutex> BlockOutputThread();
|