| 1097 | }); |
| 1098 | } |
| 1099 | void stop() { |
| 1100 | { |
| 1101 | std::unique_lock<std::mutex> lock(mtx); |
| 1102 | if (simple_io || !running) { |
| 1103 | return; |
| 1104 | } |
| 1105 | running = false; |
| 1106 | cv_stop.notify_all(); |
| 1107 | } |
| 1108 | if (th.joinable()) { |
| 1109 | th.join(); |
| 1110 | } |
| 1111 | replace_last(' '); |
| 1112 | pop_cursor(); |
| 1113 | fflush(out); |
| 1114 | } |
| 1115 | } |
| 1116 | |
| 1117 | void log(const char * fmt, ...) { |
no test coverage detected