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

Simulation should support task prioritization #7

Open
@gardnervickers

Description

@gardnervickers

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions