Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make CurrentThread::turn() more fair by always parking with 0 timeout…
… first This ensures that all fd-based futures are put into the queue for the current tick, if the CurrentThread is parking via the Reactor. Otherwise, if there are queued up futures already, only those would be polled in the turn. These futures could then notify others/themselves to have the queue still non-empty on the next turn. Which then potentially allows the reactor to never be polled, and thus fd-based futures are never queued up and polled. Also return in the Turn return value whether any futures were polled at all, which allows the caller to know if any work was done at all in this turn and based on that adjust behaviour. tokio-rs#310
- Loading branch information