Skip to content

SetTimeFlags::TimerCancelOnSet is missing a proper interface #6

Description

@main--

The current implementation of TimerFd::read() assumes that we can always obtain the number of timer expirations somehow. The whole point of enabling TimerCancelOnSet however is to introduce a case where we don't get this number.

Right now this effectively means that the only way to use this flag is to wrap the read() call in catch_panic and treat the panic case as cancellation. Clearly, this is awful.

Idea: add read_cancelable() -> Option<u64>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions