aboutsummaryrefslogtreecommitdiff
path: root/works/life/computer-network-experiment/Output.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-07 14:05:51 +0800
committercrupest <crupest@outlook.com>2021-06-07 14:05:51 +0800
commitda6c0e6194578538ce0bcd1b9815696b96153f6b (patch)
treebb4121f622161fad8810890e0e16aac8c1826605 /works/life/computer-network-experiment/Output.h
parent2de4663d385ab54c5d8b8adc68611ad67636f56f (diff)
downloadcrupest-da6c0e6194578538ce0bcd1b9815696b96153f6b.tar.gz
crupest-da6c0e6194578538ce0bcd1b9815696b96153f6b.tar.bz2
crupest-da6c0e6194578538ce0bcd1b9815696b96153f6b.zip
import(life): ...
Diffstat (limited to 'works/life/computer-network-experiment/Output.h')
-rw-r--r--works/life/computer-network-experiment/Output.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/works/life/computer-network-experiment/Output.h b/works/life/computer-network-experiment/Output.h
index b81dbfd..22b913a 100644
--- a/works/life/computer-network-experiment/Output.h
+++ b/works/life/computer-network-experiment/Output.h
@@ -5,7 +5,9 @@
#include <fmt/format.h>
#include <folly/MPMCPipeline.h>
#include <folly/MPMCQueue.h>
+#include <folly/CancellationToken.h>
+#include <thread>
#include <iostream>
enum class OutputType { Normal, Error };
@@ -42,3 +44,7 @@ void SendOutput(OutputType type, StringView format, Args &&...args) {
}
void OutputThread();
+
+void SignalAndWaitForOutputThreadStop();
+
+extern std::thread output_thread;