-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for concurrent use of global loggers
In working on UberFX, I realized that zap's global loggers are actually safe to replace at runtime; because they're pointers, they're a single machine word. Since loggers are also never mutated, we don't need any locks to make this code race-free. This commit removes the incorrect (and scary) documentation about races and adds a test that attempts to trigger a race.
- Loading branch information
Akshay Shah
committed
Feb 18, 2017
1 parent
9c5f3d4
commit 9b42938
Showing
2 changed files
with
34 additions
and
7 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