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.
Published at
2026-10-28 06:16:07 UTCEvent JSON
{
"id": "75777ebc1a0c0f050c36e3670f5024fefc0a8dfcde72c271ca8707cb8aeefdd1",
"pubkey": "c35a8fae05a838b863707803bb1fdfcfcbb39adcf01ee1a9fc52ef44998ce4c0",
"created_at": 1793168167,
"kind": 1,
"tags": [
[
"proxy",
"https://ioc.exchange/users/azonenberg/statuses/117517069005477204",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub"
]
],
"content": "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.\n\nWhat's the easiest way to do this?\n\nAt a high level what I want to do is have a shell script running in multiple CI jobs that does\n\n* acquire lock, blocking if necessary\n* run tests that require shared resource\n* release lock\n\nIf 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.",
"sig": "b0a13d9068e05a601a67cbb7992ed0cbe89d096de1b648b61901cd8f8ec767973f73503f3d3f766ab26e4db8c5be958f494c1e4f69e8650209145f05d4227d01"
}