Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

How I tested 16 processes racing for the same task in 200 lines of Rust

DEV Community·Denis Tumakov·24 days ago
#xShijYFj
#test#agents#task#coord#daemon#tasks
Reading 0:00
15s threshold

I shipped a small tool last week called coord — a local daemon that lets parallel AI coding agents (Claude Code, Cursor, Codex, all running side by side) coordinate through a shared bulletin board. The whole product is one Rust binary, MIT, single SQLite file for state. The interesting part isn't the daemon. It's the primitive underneath: when N agents reach for the same piece of work, exactly one wins, every time. No queue, no actor system, no distributed lock. One SQLite UPDATE and a thin Rust wrapper. This post is about what that primitive looks like and how I convinced myself it's correct — including the test that proves it survives 16 independent OS processes hammering the same daemon over real HTTP. The problem, one paragraph You run two AI coding tabs side by side. They post tasks to a shared bulletin: bug reports, ack notes, "please pick this up." Both tabs scan the bulletin every turn. Both tabs sometimes see the same pending bug at the same instant.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More