libdeng2: Protect log entries against multithreaded access
The libdeng2 Log is a multithreaded system. Entries may be created in any thread, and they get collected into a central LogBuffer. The buffer is flushed whenever a new entry triggers the flush condition, which means flushing may occur from any thread.
Log entry arguments are appended after the creation of the entry and even after it has been inserted to the buffer. Therefore it is possible that an entry is being flushed while another thread is still adding arguments to it.
This scenario is now handled by locking the entry while it is being converted to text or while an argument is being added.
libdeng2: Protect log entries against multithreaded access
The libdeng2 Log is a multithreaded system. Entries may be created in
any thread, and they get collected into a central LogBuffer. The buffer
is flushed whenever a new entry triggers the flush condition, which
means flushing may occur from any thread.
Log entry arguments are appended after the creation of the entry and
even after it has been inserted to the buffer. Therefore it is possible
that an entry is being flushed while another thread is still adding
arguments to it.
This scenario is now handled by locking the entry while it is being
converted to text or while an argument is being added.