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

Rewrite mpsc::shared #42883

Closed
wants to merge 1 commit into from
Closed

Commits on Jun 22, 2017

  1. Rewrite mpsc::shared

    Previous version had too much state: `cnt`, `steals`, `port_dropped`
    fields, and it's too hard to consistently update all of them during
    upgrade.  I tried to fix issue rust-lang#39364, but there are too many corner
    cases.  In this version all of these fields removed, and shared
    state is basically managed by two fields: `queue` and `to_wait`.
    
    `to_wake` field now stores both `SignalToken` and "disconnected"
    flag.
    
    All tests still pass, and bug rust-lang#39364 no longer reproduces.
    
    Patch includes a couple of stress tests.
    
    This version should have the same performance characteristics,
    because roughly the same number of atomics and wait/notify operations
    involved.
    stepancheg committed Jun 22, 2017
    Configuration menu
    Copy the full SHA
    6998b3c View commit details
    Browse the repository at this point in the history