aboutsummaryrefslogtreecommitdiff
path: root/computer-network-experiment/Output.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-07 20:20:10 +0800
committercrupest <crupest@outlook.com>2021-06-07 20:20:10 +0800
commitbc0e9b6558b7737846699c41196433055f915aec (patch)
tree6922ae75da4feb22b88d6ed2e247593dfa178a0e /computer-network-experiment/Output.h
parent1b8ff04e64e054a061f157b9458cf7c73dba43a9 (diff)
downloadlife-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.h3
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();