am 7391575a: logd: in nonblocking read, sched_yield() synchronization
* commit '7391575afdd6c27bf444dcde7a140f1b17629b8c': logd: in nonblocking read, sched_yield() synchronization
This commit is contained in:
commit
2f207af869
|
@ -92,6 +92,11 @@ bool LogReader::onDataAvailable(SocketClient *cli) {
|
|||
|
||||
bool nonBlock = false;
|
||||
if (strncmp(buffer, "dumpAndClose", 12) == 0) {
|
||||
// Allow writer to get some cycles, and wait for pending notifications
|
||||
sched_yield();
|
||||
LogTimeEntry::lock();
|
||||
LogTimeEntry::unlock();
|
||||
sched_yield();
|
||||
nonBlock = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue