Three products with limited stock. Click Buy and watch the count
tick down in real time. Server runs live.lock({ key: (ctx, id) => 'flash:product:' + id, maxWaitMs: 1500 }, ...) so concurrent buys on one product serialize FIFO and stock never
goes negative. Spam the stress button to surface LOCK_TIMEOUT: queued waiters past the bound get
rejected instead of holding the request indefinitely.
Shopping as Quirky Narwhal (20666169)
loading...
Drives concurrent buys at the chosen product. Lock serializes
them; bursts past maxWaitMs (1500ms)
surface as LOCK_TIMEOUT. Per-buy artificial delay
is 80ms.
Nothing yet.