A Reader-Writer Lock allows either multiple readers to access data simultaneously, OR one exclusive writer - but never both at the same time. This optimizes for read-heavy workloads.
Notice how multiple readers can be active at once, but when a writer takes the lock, everyone else must wait!
Multiple can read simultaneously
Need exclusive access (no other readers or writers)
Writers wait for readers, but get priority to prevent starvation
Start simulation to see events...