Skip to content

Commit

Permalink
Extract and export a standalone TaskRunner
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed Jan 5, 2018
1 parent a26e594 commit df6c5b3
Show file tree
Hide file tree
Showing 4 changed files with 374 additions and 310 deletions.
Loading

0 comments on commit df6c5b3

Please sign in to comment.