Send is a Rust marker trait for values that can be moved safely between threads. The compiler derives it when appropriate; application code usually composes Arc, Mutex, or RwLock rather than implementing it directly. section 6.5
Use Send-related reasoning when handling shared state:
- Move a value between threads only through a type that implements Send. section 6.5
- Use Sync for shared references; combine Arc with synchronization primitives when ownership and thread sharing intersect. section 6.5
Global test counter
A direct mutable static fails because concurrent mutation can violate aliasing rules. An atomic counter addresses the operation itself, while Arc and lazy_static address ownership and runtime initialization: clone the Arc inside each test, then call fetch_add.
