Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Send and Sync

The two marker traits that say whether a type may be moved to, or shared with, another thread.

T: Send means a T can be moved to another thread; T: Sync means &T can be shared between threads. They are implemented automatically when all fields qualify; Rc is neither, Arc<Mutex> is both (for T: Send).

Loading interactive…

Examples

  • Moving an Rc<i32> into thread::spawn fails with E0277 (Rc<i32> cannot be sent between threads safely); the same code with Arc<i32> compiles.

Read the full section →