everything happens at once
In the reef, every organism acts simultaneously. The cleaner wrasse tends its client while the parrotfish grazes and the moray watches from its crevice. No conductor orchestrates their movements. They execute in parallel -- each thread of life running its own instruction set, sharing the same water, the same light, the same current.
The ocean is the shared address space. Every current carries information; every chemical gradient is a signal broadcast to all listeners. The reef does not partition its resources -- it trusts its inhabitants to coordinate through protocol, not isolation.
Below the reef shelf, the water darkens and the rules change. Here, shared resources demand coordination. The mutex is the narrow passage through which only one fish may pass at a time.
async fn swim(reef: &Arc<Reef>) {
let permit = reef.semaphore.acquire().await;
reef.enter(current_fish);
// the reef has room for us
}
Semaphores count the remaining slots. Barriers wait until every participant has arrived before any may proceed. The water teaches patience.
Rather than sharing memory, processes share messages -- packets of data sent through typed channels, like bioluminescent pulses between organisms that never touch.
All threads must arrive before any may leave. The barrier is a rendezvous point in the dark water -- a place where independence yields to collective readiness.
In the deepest water, bioluminescence replaces sunlight and certainty gives way to probability. A race condition occurs when the outcome depends on the unpredictable timing of independent actors -- two anglerfish lunging for the same prey, two threads writing to the same address. The result is undefined. The result is chaos rendered invisible until it surfaces as a bug at 3 AM.
The reef teaches us: concurrency is not about speed. It is about correctness under uncertainty. Every living system on this planet runs concurrent processes. The question is never whether to parallelize, but how to survive the parallelism.
A future is a value that does not yet exist -- a bioluminescent pulse traveling through dark water toward a receiver that has already moved on to other work. The promise is kept when the light arrives.