Data races occur when a piece of memory is updated by one party while another tries to read or update it simultaneously (without synchronization between the two). Let's look at the classic example of a data race using a shared counter.
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::threa...