Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters