Skip to content
Discussion options

You must be logged in to vote

If I understand correctly, the principle behind block_in_place is to switch the current thread to the IO thread pool. However, my idea was to switch the Future instead.

The block_in_place does the following steps.

  1. Sending the local Futures to a freshly spawned worker thread if the current thread is a worker thread.
  2. Invoking the input blocking closure.
  3. Terminate the current thread.

It never convert the current thread to a worker thread, it just spawns a new worker thread an send the local Futures to it.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Jason5Lee
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants