Using a global mutex-guarded vector when message passing would do.
Feels familiar to anyone coming from threaded languages — share memory, lock it.
Every reader and every writer contends on the same lock. Throughput collapses, and
holding the guard across an .await deadlocks the runtime.
Pass ownership through channels — one task owns the data, others send messages. The type system enforces the discipline; no runtime locking is needed.
Canonical alternative
concurrency/channels