Chapter 3: Understanding Concurrency
Speeding up our code with Rust is useful. However, understanding concurrency and utilizing threads and processes can take our ability to speed up our code to the next level. In this chapter, we will go through what processes and threads are. We then go through the practical steps of spinning up threads and processes in Python and Rust. However, while this can be exciting, we also must acknowledge that reaching for threads and processes without thinking about our approach can end up tripping us up. To avoid this, we also explore algorithm complexity and how this affects our computation time.
In this chapter, we will cover the following topics:
- Introducing concurrency
- Basic asynchronous programming with threads
- Running multiple processes
- Customizing threads and processes safely