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 lost Waker instances with async stdio streams #8782

Merged
merged 2 commits into from
Jun 12, 2024

Commits on Jun 12, 2024

  1. Fix lost Waker instances with async stdio streams

    This commit fixes a bug in the `Subscribe` trait implementation for
    `AsyncStd{in,out}Stream` structures in the `wasmtime-wasi` crate.
    Previously these implementations would create a future for the duration
    of a single `poll` but then the future was dropped which could lead to
    lost wakeups as the waker is gone after the future is dropped. The fix
    was to use a `tokio::sync::Mutex` here instead of a `std::sync::Mutex`
    and leave some comments about why contention isn't expected.
    
    Closes bytecodealliance#8781
    alexcrichton committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    6efb0aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a5899e View commit details
    Browse the repository at this point in the history