-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
For now, futex and sync (with atomic-wait) implementation does not have support for waiting with a timeout.
macOS does have the
__ulock_waitsyscall that do support a timeout, but it's a private/unstable APIUsage of private APIs can result in software being rejected from Apple's app stores
See also m-ou-se/atomic-wait#4
There have two solutions:
- Waits for Apple to expose a public API for futex/atomic-wait
- Implements it as a global pool containing mutexes and condition variables
The last option sounds like the only option I can to do something. But, the most common use case for latch is waiting without timeout. The last option will significantly increase the code size for a rare case.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed