Skip to content

Feature request: DelayTimer check if ID is in use #41

@alpha-tango-kilo

Description

@alpha-tango-kilo

Is your feature request related to a problem? Please describe.
I'd like to be able to check if a task with a specific ID is already being handled by DelayTimer, so I can avoid overwriting accidentally by inserting a new task with the same ID

Describe the solution you'd like

impl DelayTimer {
    pub fn has_task(&self, id: u64) -> bool {
        todo!()
    }
}

Describe alternatives you've considered
A workaround I considered was trying to remove a task then re-adding it if it existed, however DelayTimer::remove_task doesn't return the task being removed

Additional context
For use in my upcoming project

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