[Base] Properly flush remaining writes out before shutting down logging.
This commit is contained in:
parent
24dd0267bf
commit
fb50f02a98
|
@ -156,9 +156,12 @@ class Logger {
|
|||
void WriteThread() {
|
||||
RingBuffer rb(buffer_, kBufferSize);
|
||||
uint32_t idle_loops = 0;
|
||||
while (running_) {
|
||||
while (true) {
|
||||
bool did_write = false;
|
||||
rb.set_write_offset(write_tail_);
|
||||
if (!running_ && rb.empty()) {
|
||||
break;
|
||||
}
|
||||
while (!rb.empty()) {
|
||||
did_write = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue