Skip to content

Conversation

jenseng
Copy link
Contributor

@jenseng jenseng commented Sep 17, 2025

Various improvements to withLock and its tests

  • fix windows race conditions/errors
  • use second-level granularity when detecting lock compromise; this resolves a sporadic floating point issue under APFS, and makes this generally more robust no matter the underlying file system
  • improve touchLock logic so that it doesn't compromise the lock for the next holder or keep running the interval when cleanup fails

Testing notes

Fixes were verified via a modified GHA workflow that ran all the tests 100 times 😅

References

Related to #8512

various improvements to withLock and its tests

- fix windows race conditions/errors
- use second-level granularity when detecting lock compromise; this
  resolves a sporadic floating point issue under APFS, and makes this
  generally more robust no matter the underlying file system
- improve touchLock logic so that it doesn't compromise the lock for
  the next holder or keep running the interval when cleanup fails
@jenseng jenseng marked this pull request as ready for review September 17, 2025 16:23
@jenseng jenseng requested a review from a team as a code owner September 17, 2025 16:23
@wraithgar wraithgar self-assigned this Sep 17, 2025
@owlstronaut owlstronaut self-assigned this Sep 23, 2025
@owlstronaut owlstronaut merged commit 7949cff into npm:latest Sep 23, 2025
16 checks passed
@github-actions github-actions bot mentioned this pull request Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants