Logger: add extra safety.

Though, that's not really enough for now.
This commit is contained in:
Guillaume Jacquemin 2022-04-24 17:14:21 +02:00
parent 4d94b10501
commit 929e0c73ee
1 changed files with 5 additions and 0 deletions

View File

@ -112,6 +112,11 @@ addEntry(EntryType type, StringView message) {
ArrayView<const LogEntry>
entries() {
if(!_logMutex.try_lock()) {
return nullptr;
}
_logMutex.unlock();
return _entries;
}