Expand description
This module takes care of scheduling the actors appropriately
My current guess is that we want the actors scheduled in round-robin fashing: keep running until you can’t go any further (stall), and then wait until someone stalls on you. That’s ideal in that it minimizes switching. This is also good because it ideally mimizes null-message passing.
To implement this without actually monitoring everything, I propose running a certain number of workers, each advancing a particular actor until it stalls, then putting that actor to the back of the queue. Ideally this actor will next be scheduled when all of its neighbours will have made progress.
To actually do this, each actor needs an “advance” method that will return when it can’t make any more progress, and can be called repeatedly. This module can take these “advanceables” (trait?) and schedule them via crossbeam’s work-stealing queue (insert link).
Enums§
- Actor
State - Return value for actors to use to signal their state to the workers
Traits§
- Advancer
- Advancer trait to be implemented by the simulation actors
Functions§
- run
- Runs until no more progress can be made at all…
Type Aliases§
- Locked
Task Heap - Convenience wrapper for a reference counted, distributed heap of frozen actors…