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

Disable early-out notify optimizations #139

Merged
merged 1 commit into from
May 28, 2024
Merged

Disable early-out notify optimizations #139

merged 1 commit into from
May 28, 2024

Commits on May 27, 2024

  1. bugfix: Disable early-out notify optimization

    The notify() function contains two optimizations:
    
    - If the `inner` field is not yet initialized (i.e. no listeners have been
      created yet), it returns `0` from the function early.
    - If the atomic `notified` field indicates that the current notification would
      do nothing, it returns `0` early as well.
    
    `loom` testing has exposed race conditions in these optimizations that can cause
    notifications to be missed, leading to deadlocks. This commit removes these
    optimizations in the hope of preventing these deadlocks. Ideally we can restore
    them in the future.
    
    Closes #138
    cc #130 and #133
    
    Signed-off-by: John Nunley <dev@notgull.net>
    notgull committed May 27, 2024
    Configuration menu
    Copy the full SHA
    bd1df0d View commit details
    Browse the repository at this point in the history