Multithreading

So far, we have seen how to make our code faster and faster by optimizing various aspects of how we code, but there is still one point left to optimize: making our code work in parallel. In this chapter, you will learn how fearless concurrency works in Rust by using threads to process your data.

During this chapter, you will learn the following:

  • Send and Sync traits—how does Rust achieve memory safety?
  • Basic threading in Rust—creating and managing threads
  • Moving data between threads
  • Crates to make multithreading easier and faster

Get Rust High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.