A call to poll
can never block, otherwise the entire thread the async core executes on will be blocked, stopping all possible causality until the blocking function returns.
I spawn a future onto the reactor, and there are a series of combinators like my_future.and_then(…).map(…).then(…)
.
The reactor polls the future, and then before it executes the next and_then
combinator, does the reactor iterate through all other futures, checking to see if they are ready, or does the reactor follow through with all the combinatorial steps of my_future.and_then(…).map(…).then(…)
?
I am asking this question because it is important to know how to design my program given the causality of the async core.