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

View file

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