Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Simulation should support task prioritization #7

Open
gardnervickers opened this issue Nov 11, 2019 · 0 comments
Open

Simulation should support task prioritization #7

gardnervickers opened this issue Nov 11, 2019 · 0 comments

Comments

@gardnervickers
Copy link
Member

Related to #5, it's desirable that Simulation can test errors which occur due to task execution ordering. Currently, this can be done by adding a random Delay to each spawned task. This may not be sufficient for large number of tasks though, as the default Timer implementation has a 1ms granularity. Having a granularity this high may cause undesirable timeouts for other parts of the system.

I think the easiest way to fix this is to switch timer implementations to something based on nanoseconds or microseconds. Further, each spawned task would have a Delay of at least 1 nanosecond, This would also fix #5, as users could use the logical clock via Now::now() to see the precise state a simulation is in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant