-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
By changing LockedSource.src from a pointer to a value its zero value becomes usable without panics. Document this behavior and add an example. Notably, it is not simply a Source protected by a sync.Mutex, as Rand also type-asserts on it for efficiency. Fixes golang/go#49342 Change-Id: Iec00766957229b7c67ede37894c9e5b9d6d8f852 Reviewed-on: https://go-review.googlesource.com/c/exp/+/385094 Reviewed-by: Rob Pike <[email protected]> Trust: Cherry Mui <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 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