MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / pause

Method pause

smallthinker/common/log.cpp:271–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269 }
270
271 void pause() {
272 {
273 std::lock_guard<std::mutex> lock(mtx);
274
275 if (!running) {
276 return;
277 }
278
279 running = false;
280
281 // push an entry to signal the worker thread to stop
282 {
283 auto & entry = entries[tail];
284 entry.is_end = true;
285
286 tail = (tail + 1) % entries.size();
287 }
288
289 cv.notify_one();
290 }
291
292 thrd.join();
293 }
294
295 void set_file(const char * path) {
296 pause();

Callers 2

WnFunction · 0.80
common_log_pauseFunction · 0.80

Calls 2

joinMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected