MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / pause

Method pause

subprojects/llama.cpp/common/log.cpp:283–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281 }
282
283 void pause() {
284 {
285 std::lock_guard<std::mutex> lock(mtx);
286
287 if (!running) {
288 return;
289 }
290
291 running = false;
292
293 // push an entry to signal the worker thread to stop
294 {
295 auto & entry = entries[tail];
296 entry.is_end = true;
297
298 tail = (tail + 1) % entries.size();
299 }
300
301 cv.notify_one();
302 }
303
304 thrd.join();
305 }
306
307 void set_file(const char * path) {
308 pause();

Callers 2

common_log_pauseFunction · 0.45
common_log_flushFunction · 0.45

Calls 2

sizeMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected