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

Only use one thread with Tokio #202

Merged
merged 1 commit into from
Jun 4, 2022
Merged

Only use one thread with Tokio #202

merged 1 commit into from
Jun 4, 2022

Commits on Jun 4, 2022

  1. Only use one thread with Tokio

    When Tokio gets event notification from kevent, the pending future may
    belong to a different thread.  If so, it signals the other thread and
    pends on kevent again.  But the other thread may not have had time to
    call aio_return yet.  In that case, the first thread's kevent will
    immediately return again.
    
    The correct solution is to set EV_ONESHOT on the aiocb.  But Rust's libc
    doesn't currently expose the necessary field.  Until it does, restrict
    Tokio to just a single thread.
    
    rust-lang/libc#2813
    asomers committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    1f604e7 View commit details
    Browse the repository at this point in the history