-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The current implementation places each task/node in the dataflow graph onto its own thread and let's it run to completion. As such scheduling is performed by the OS scheduler (assuming that Rust's threads map directly to OS threads.)
To schedule the dataflow graph maybe more efficiently, we would like to be able to build our own scheduler (such that we can provide specific scheduling algorithms easily). The challenge: without touching the code generation!
The idea is to replace the type of the channels with our own implementation. With that in place, a send
call puts work into the work queue while a recv
call waits until work is available. A good start is to provide a simple implementation of the concept of tasks and IVars which leads directly to an implementation of a work stealing scheduler.
See the work on monad par
in Haskell for details.
This would require us to change only a single line in the code generation (, the one that makes the type of channels a configuration parameter of the code generation).