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

Add impl Spawn and LocalSpawn for Arc and Rc. #2039

Merged
merged 1 commit into from Jan 23, 2020

Commits on Jan 23, 2020

  1. Add impl Spawn and LocalSpawn for Arc and Rc.

    Since rust-lang#1950 (0.3.0) the Spawn and LocalSpawn only require a shared reference
    for spawning operations.
    
    This adds blanket impls for `Arc<Sp: ?Sized + Spawn>` and `Rc<Sp: ?Sized + Spawn>`.
    It does the same for LocalSpawn.
    
    This allows client code to pass an Arc<Exec> when library code takes
    parameters as `&dyn Spawn` or `impl Spawn`.
    
    So far there were blanket impls for `&`, `&mut` and `Box`.
    najamelan committed Jan 23, 2020
    Copy the full SHA
    94fff6b View commit details
    Browse the repository at this point in the history