Loading tutorials
move closures, and basic use of std::thread::spawn.3 min readmove closures, trait bounds, and the basics of thread::spawn and JoinHandle.2 min readmove, and basic use of thread::spawn. It also assumes you know that Send means a value can move to another thread.2 min readmove, and basic use of thread::spawn. It also assumes you know that Send means a value can be moved to another thread.2 min readSend allows moving a value to another thread and Sync allows sharing &T between threads.2 min readthread::spawn, move closures, and trait bounds. It also assumes you know that Send is a marker trait for values whose ownership can move to another thread. Here you learn which standard types opt out of Send and why.2 min readT: Sync means &T is Send, and that you have used thread::spawn and thread::scope. It covers which standard types are not Sync, why, and what to use instead.2 min readSend and Sync promise, and that Cell and RefCell are not Sync. Here you will see how the standard library gives you shared mutable state that is Sync.2 min readthread::spawn, move closures, and trait bounds. It also assumes you have met Send and Sync as marker traits. Here you will see why the standard pattern for shared mutable state satisfies both.2 min readmove, basic use of thread::spawn and JoinHandle, and trait bounds. It also assumes you have met Send and Sync as marker traits.2 min readthread::spawn, move closures, and the Send and Sync rules from the earlier chapters. This chapter shows how thread::scope lets threads borrow local data, so you can skip Arc.2 min readSend and Sync promise, how thread::spawn bounds its closure, and the usual thread-safe types (Arc, Mutex, atomics).2 min readSend and Sync from a struct's fields. It also assumes you know what PhantomData is and how unsafe impl works. Here you will learn how to make your own type refuse to cross threads, even when all its fields would allow it.2 min readasync fn, .await, and the Send bound on thread::spawn. You don't need a specific runtime. The examples only check trait bounds, so they need no external crates.2 min read