-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
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
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.