-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #131: maintain a thread-local logger stack (RC fix)
Originally `byexample` used a global stack of loggers to support contextual logging. This works fine when we work with subprocesses because each one will have its own stack. But with threads, all of them will see the same shared stack. This RC will confuse the logging system: while one thread enter in `'byexample.exec'` context it may end logging as `'byexample.init'` because other thread entered in that context. Using a thread-local logger stack fixes the RC. Now the `init_thread_specific_log_system` function needs to be called at the begin of each thread to initialize it.
- Loading branch information
Showing
2 changed files
with
38 additions
and
5 deletions.
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