aboutsummaryrefslogtreecommitdiff
path: root/works/life/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
commitc10e08c3896343cc7ddffe1dd7b1d09da2f8548e (patch)
tree9a62f500d177a4190a4c3b642a58a38e109e56ea /works/life/computer-network-experiment/Output.h
parent04bc88aca6157dfd1d2309b353d9feb64bcc8800 (diff)
downloadcrupest-c10e08c3896343cc7ddffe1dd7b1d09da2f8548e.tar.gz
crupest-c10e08c3896343cc7ddffe1dd7b1d09da2f8548e.tar.bz2
crupest-c10e08c3896343cc7ddffe1dd7b1d09da2f8548e.zip
import(life): ...
Diffstat (limited to 'works/life/computer-network-experiment/Output.h')
-rw-r--r--works/life/computer-network-experiment/Output.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/works/life/computer-network-experiment/Output.h b/works/life/computer-network-experiment/Output.h
index 2d16eb0..689c3d3 100644
--- a/works/life/computer-network-experiment/Output.h
+++ b/works/life/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();