generated from al8n/template-rs
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix insufficient synchronization in examples (#30)
The examples use `Arc::strong_count` in order to await all other threads having terminated. Unfortunately, `Arc::strong_count` uses a `Relaxed` atomic to load the value, so this can not be used to establish an ordering, and later leads to a weak memory data race. The alternative is to use `get_mut`, which uses the internal `is_unique` function, which is unfortunately private and therefore not usable directly.
- Loading branch information
1 parent
bcd0436
commit b2eb642
Showing
3 changed files
with
6 additions
and
6 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
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