Send trait

But how can the compiler prevent us from doing data races? This is thanks to the Send and Sync marker traits. A type that implements the Send trait is safe to be sent to another thread. As you may have guessed, Rc does not implement Send. Since it does not use atomic operations to increment its counter, if two threads were to increment it at the same time, that would be a data race.