Skip to content

Update to tokio 0.2.5-throttling

  • Working version using tokio-0.2.0.
  • Remove waitable in favour of JoinHandle which is now returned by spawn. Same for abortable_waitable.
  • Review FIXMEs in runtime/executor.rs. Decision: implement throttling in tokio.
  • Experiment and find a better implementation for block_on! and update PadSrc accordingly. Not much luck here.
  • Implement throttling in tokio.
  • Have the tokio-0.2.x-thottling branch merged upstream. See comment below.
  • Use tokio based timers.
  • Remove block_on! macro in favour of futures::executor::block_on.
  • Fix tests/pipeline.rs premature_shutdown which hangs 1 time out of 2,000 when run in a loop. Some fixes implemented on the branch before this MR (see). The test premature_shutdown still hangs from time to time. This might be due to ContextShutdown not being able to unpark the Runtime now. Let's keep it like this for now and check again we have throttling in tokio. Not reproduced with latest versions.

tokio-0.2.0 removed functions that were necessary for the threadshare framework. These functions allowed controlling the executor and implementing the throttling strategy which reduces CPU usage and increases bandwidth in use cases such as those for which the threadshare frame work is designed. An implementation of tokio's BasicScheduler is now available (see this branch), but not yet merged upstream.

Edited by François Laignel

Merge request reports

Loading