Join Nostr
2026-10-28 06:16:07 UTC

Andrew Zonenberg on Nostr: I'm looking for a mutex-type tool I can run in a distributed system on a LAN to ...

I'm looking for a mutex-type tool I can run in a distributed system on a LAN to arbitrate access to a shared resource that only supports a single user at a time.

What's the easiest way to do this?

At a high level what I want to do is have a shell script running in multiple CI jobs that does

* acquire lock, blocking if necessary
* run tests that require shared resource
* release lock

If the tests fail or hang and the CI VM is forcibly terminated by the scheduler, this needs to (by a socket timeout, TCP RST, or similar) release the mutex within a reasonable time frame.