Skip to content

replace channel-based timers with a recv_timeout method #11223

Closed
@thestinger

Description

@thestinger

If it's done directly on channel types, it will be easier to use because it won't require the caller to worry about a pattern like select.

For the 1:1 case, this would just be a call to pthread_cond_timedwait after initializing the condition variable with CLOCK_MONOTONIC as the clock.

Windows condition variables expose a similar method taking a relative time, but there's no way to wait again for the remaining time after a spurious wake-up. If this is important, we can build the functionality on top of the win32 API or use another implementation.

For M:N threading it can either keep doing what it does now behind the scenes, or use an efficient timer/condvar contraption too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions