ACT 01 / PROCESS ZERO

CONCURRENT DAY

The curtain rises on a single tick of time, split into six blazing execution contexts.

fork()spawn()run()
BANG!

One moment becomes many.

A glamorous pop-art war room for threads that refuse to stand in line.

The scheduler snaps its fingers. Everything starts now.
ACT 02 / SHARED STATE

RACE CONDITION!

Two performers grab the same spotlight and the script mutates under their gloves.

balance = balance + 1

Off-register time

Watch the panels misprint by a few pixels: a visual stutter for reads and writes arriving too close.

Thread A reads the old value.

Thread B applauds too early.

Without coordination, the final number is just theater.
ACT 03 / CRITICAL SECTION

MUTEX!

The velvet rope drops. One thread enters the jewel room while the others glow outside.

Lock / Work / Release

  • lock.acquire()
  • touch the shared treasure
  • lock.release()
Opulence is just discipline wearing gold.
LOCK
jobjobjobjobjob
ACT 04 / BACKPRESSURE BALLET

Queues keep tempo.

Messages line up like jewel-bright chorus dancers, each waiting for its cue.

Producer → Broker → Worker

The audience sees simultaneity; backstage, bounded buffers prevent chaos.

Not slower. Composed.
ACT 05 / STALEMATE

DEADLOCK!

Four aristocrats hold four keys and wait forever for applause that cannot arrive.

Break the circle

Order locks, time out boldly, and let one process bow out before the opera freezes.

A waiting room can become a prison if every door is polite.
ACT 06 / SYNCHRONIZED COMPLETION

JOIN THE DAY

Every thread returns with a fragment of the result. Together, the fragments become ceremony.

await allreducecommit
Parallelism is not noise. It is a chorus with a conductor.