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

Improve thread notify #597

Merged
merged 4 commits into from
Oct 25, 2017
Merged

Improve thread notify #597

merged 4 commits into from
Oct 25, 2017

Commits on Oct 1, 2017

  1. Rename ThreadUnpark -> ThreadNotify

    This renames an internal type away from deprecated terminology.
    carllerche committed Oct 1, 2017
    Configuration menu
    Copy the full SHA
    5323e68 View commit details
    Browse the repository at this point in the history
  2. Reuse ThreadNotify when blocking thread for future

    This change avoids the Arc allocation for each blocking call as well as
    eliminates the need to perform the Arc ref count increment if
    unnecessary.
    carllerche committed Oct 1, 2017
    Configuration menu
    Copy the full SHA
    28df950 View commit details
    Browse the repository at this point in the history
  3. Use an atomic to avoid unnecessary mutex locking

    Unfortunately, using an atomic requires a final atomic CAS within the
    "wakeup" mutex. This means we cannot use the thread park / unpark
    helpers from std.
    
    This change increases a single threaded "yield" benchmark by almost 40%.
    carllerche committed Oct 1, 2017
    Configuration menu
    Copy the full SHA
    d832074 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    60d9ce1 View commit details
    Browse the repository at this point in the history