forked from golang/dep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/gps: resolve race in monitoredCmd
*monitoredCmd.combinedOutput and gps.TestMonitoredCmd used to access monitoredCmd.stdout and monitoredCmd.stdout (both of type *activityBuffer) without obtaining a lock on activityBuffer.Mutex. This caused the tests to fail on rare occasions. This change add 2 methods to ensure reads from to the underlying bytes.Buffer happens only when a lock is obtained. Signed-off-by: Ibrahim AshShohail <[email protected]>
- Loading branch information
Showing
2 changed files
with
67 additions
and
39 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