Skip to content

Full support for timeouts #9

@mirromutth

Description

@mirromutth

For now, futex and sync (with atomic-wait) implementation does not have support for waiting with a timeout.

macOS does have the __ulock_wait syscall that do support a timeout, but it's a private/unstable API

Usage 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

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions