Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fix a race in the delegating logger
For as long as the delegating loggers Fullfill wasn't called, it holds a loggerPromise and that loggerPromise holds the same delegating logger. Calls to With{Name,Field} and FullFill of such a loggerPromise and delegatingLogger pair have to be serialized, because the former accesses the actual logger and promise, while the latter sets and unsets them. Furthermore, a call to With{Name,Field} of such a pair returns a new pair that is attached to the parent pair by making the original promise keep a reference to the new promise. Because of that, the aforementioned serialization has to happen recursively for each pair.
- Loading branch information
1 parent
0918618
commit 1b540b3
Showing
2 changed files
with
47 additions
and
0 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