Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/futures-rs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rust-lang/futures-rs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: run-futures
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 45 files changed
  • 2 contributors

Commits on Nov 10, 2017

  1. Deprecate Future::wait. (#634)

    This commit deprecates `Future::wait`. Instead of having a trait
    function, a wrapper is provided at `future::Blocking`. `Blocking` wraps
    a `Future` value and provides thread-blocking operation on it.
    
    The same treatment is applied to `Sink` and `Stream`.
    
    Related: tokio-rs/tokio-rfcs#3.
    carllerche authored Nov 10, 2017
    Configuration menu
    Copy the full SHA
    458887c View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2017

  1. Implement CurrentThread executor. (#639)

    The `CurrentThread` executor is an event loop that allows the user to
    spawn tasks that are guaranteed to run on the current thread.
    
    This is done by extracting the scheduling logic from FuturesUnordered
    and moving it to a `scheduler` module that can be used by both
    `FuturesUnordered` and `CurrentThread` executor.
    
    This is based on the Tokio reform RFC, but also includes some API
    tweaks.
    carllerche committed Nov 16, 2017
    Configuration menu
    Copy the full SHA
    1dd87c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2017

  1. Implement executor::Enter (#647)

    This helps prevent accidentally blocking an executor thread.
    carllerche authored Nov 20, 2017
    Configuration menu
    Copy the full SHA
    3826530 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2017

  1. Sleep trait (#665)

    This enables customizing executor sleeping strategies.
    
    Currently, it is not possible to run a Tokio reactor and a 
    `CurrentThread` executor on the same thread. The executor is
    hard coded to use condvars for sleeping and the Tokio reactor
    requires calling `epoll_wait` (or equivalent) for blocking the
    current thread.
    
    The `Sleep` trait is added to abstract over this sleeping strategy.
    
    Beyond just supporting the Tokio reactor, adding a `Sleep` trait is
    useful for integrating any logic that requires hooking into the sleep
    strategy (e.g. timers).
    
    `executor::CurrentThread` is then modified to accept a `Sleep` value
    that allows specifying a custom sleep strategy.
    carllerche authored Dec 6, 2017
    Configuration menu
    Copy the full SHA
    a26e594 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2018

  1. Extract and export a standalone TaskRunner

    This commit extracts the `TaskRunner` interface from the `current_thread` module
    to a standalone interface and also reexports it from the `executor` module. This
    is done with #675 as the primary motivation, namely accommodating crates using
    `CurrentThread` on foreign event loops like glib. In this situation Rust (and
    associated code) can't request to block (aka with `run_with_sleep`) and as a
    result need a nonblocking method (`TaskRunner::poll` here) instead.
    
    The `current_thread` module was then reimplemented in terms of `TaskRunner` to
    ensure there's no extra duplication.
    alexcrichton committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    2684d92 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2018

  1. run futures

    alexcrichton committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    b69e9da View commit details
    Browse the repository at this point in the history
Loading