MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / stopCompressionThread

Function stopCompressionThread

runtime/LogTest.cc:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46using namespace Log;
47
48void stopCompressionThread() {
49 {
50 std::lock_guard<std::mutex> lock(
51 RuntimeLogger::nanoLogSingleton.condMutex);
52 RuntimeLogger::nanoLogSingleton.compressionThreadShouldExit = true;
53 RuntimeLogger::nanoLogSingleton.workAdded.notify_all();
54 }
55
56 if (RuntimeLogger::nanoLogSingleton.compressionThread.joinable()) {
57 RuntimeLogger::nanoLogSingleton.compressionThread.join();
58 }
59}
60
61void restartCompressionThread() {
62 stopCompressionThread();

Callers 1

restartCompressionThreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected