simplify usage of mutexes and atomic constants (#9501)

This commit is contained in:
Harshavardhana
2020-05-03 22:35:40 -07:00
committed by GitHub
parent fbd15cb7b7
commit 27d716c663
18 changed files with 419 additions and 305 deletions

View File

@@ -34,9 +34,10 @@ var (
DebugPrint = false
// Used by the caller to print multiple lines atomically. Exposed by Lock/Unlock methods.
publicMutex = &sync.Mutex{}
publicMutex sync.Mutex
// Used internally by console.
privateMutex = &sync.Mutex{}
privateMutex sync.Mutex
stderrColoredOutput = colorable.NewColorableStderr()