Skip to content

More efficient sleeping #8

@ire4ever1190

Description

@ire4ever1190

Taking a look at the code I am wondering why I am using polling for the tasks.

For async I can register a future when the queue is empty that I just complete when a new task is added (literally mimicing how I implemented the sleep cancelling for adding in new tasks)

For sync, thinking I could maybe add a conditional variable that I just await with a timer (TODO: Check how accurate the timer is). Might need to get the whole gcsafety working well first though

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions