Loading tutorials
std::thread::spawn, the JoinHandle it returns, and join, which waits for a thread and collects its result. It assumes you know Rust ownership and borrowing, closures, Result and unwrap, and basic traits and generics. You should also be able to build and run programs wit6 min readthread::spawn and join. Here you will see why nearly every closure passed to spawn starts with move, and what to do when move causes pro5 min readmove, basic traits and trait bounds, and how to call thread::spawn and join. Earlier chapters covered why spawned closures5 min readstd::sync::mpsc. It assumes you can spawn and join threads, that you know why thread closures use move, and that you have met the Send trait. It also assumes you are comfortable with Result, unwrap, generics, and running programs with cargo.5 min readstd::sync::mpsc: multiple producer, single consumer. You will clone a Sender, hand each clone to a thread, and collect messages in one place. It assumes you know how to spawn and join threads, why thread closures use move, and the basics of a channel with one 5 min readmove closures, and send values over an mpsc channel with send and recv. It also assumes you are comfortable with Result and pattern matching. Here you will learn the receiving side in detail: which method to call, what each one ret4 min readmove closures, and use Result and unwrap. It also assumes you have sent values through an mpsc channel. Here you learn when a channel counts as closed, what each side sees when that happens, and how that ends loops and prevents hangs5 min readResult values, and this chapter covers how to read them and respond.5 min readmove, Result and unwrap, and how to run a program with cargo. You should also have read the earlier chapters on thread::spawn, join, and move closures.6 min readmpsc::channel with Sender and Receiver, and know that a receiving loop ends once every sender is dropped. It builds on the earlier chapters on channel closing and on handling send errors.5 min readmove, Result and unwrap, and the basics of thread::spawn and join. It also assumes you know why Send and Sync exist. Channels move values between threads. Sometimes several threads need to read and update the same val6 min readmove closures. It also assumes you know mpsc::channel, cloning a Sender, and Arc<Mutex<T>>. If any of those feel shak6 min readthread::spawn, move closures, Send and Sync, mpsc channels, and Arc<Mutex<T>>. You should be comfortable reading Result values from join, send, and lock. The goal is a set of criteria you can apply when a design could use e7 min read