Skip to content

v0.2.1

Latest

Choose a tag to compare

@danog danog released this 26 Nov 12:08

fork() works again, also from inside a running loop: this fixes Psalm hanging with revolt-rs loaded.

  • fork() support is back (#4). 0.2.0 removed it (#3), but Psalm's worker pool forks from inside the running loop (amphp/parallel's ForkContext). On Linux, a child's first poll replayed a change the parent had queued at the fork on the parent's epoll instance, which is shared across fork(). That deleted the parent's IPC listener, and the parent then waited in epoll_wait forever. This hung about 10% of Psalm CI jobs. A forked child now gets its own poller, wait timer and signal wake pipe at its next poll, and never touches the parent's. ForkTest covers it, including a deterministic reproduction of the Psalm case.
  • Performance: the fork check is one relaxed atomic load per poll, inlined; the rebuild is out of line. Re-arming a registered source, enabling and disabling check nothing (before 0.2.0, every arm checked).
  • Development: rustfmt and clippy (-D warnings) run in CI on Linux, macOS and Windows; the code is formatted and clippy-clean.

Embedders (danog/mongo-php-async-driver) pick it up by its tag.