Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix insufficient synchronization in examples #30

Merged
merged 1 commit into from
Aug 28, 2024

Commits on Aug 28, 2024

  1. Fix insufficient synchronization in examples

    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.
    JoJoDeveloping committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    e20be2c View commit details
    Browse the repository at this point in the history