Rust Concurrency & Async Training
Harness Rust’s fearless concurrency model in this intensive 3-day training. Learn to write parallel and asynchronous code that is both safe and performant, using threads, channels, async/await, and the Tokio runtime. This course takes you from basic thread spawning to building high-throughput async services that handle thousands of concurrent connections.
Training Details
Section titled “Training Details”| Duration | 3 days (24 hours) |
| Level | Intermediate |
| Delivery | In-person, Live online, Hybrid |
| Certification | N/A |
Who Is This For?
Section titled “Who Is This For?”- Rust developers building concurrent or parallel applications
- Backend engineers designing high-throughput services
- Systems programmers working with multi-threaded workloads
- Developers migrating from Go, Java, or C++ concurrency models
- Anyone building network services or data pipelines in Rust
Learning Outcomes
Section titled “Learning Outcomes”After completing this training, you’ll be able to:
- Spawn and manage OS threads with safe data sharing
- Use channels for message passing between threads
- Protect shared state with Mutex, RwLock, and atomic types
- Write async functions with async/await and the Future trait
- Build high-performance services using the Tokio runtime
- Debug and profile concurrent Rust applications
Detailed Agenda
Section titled “Detailed Agenda”Day 1: Thread-Based Concurrency
Section titled “Day 1: Thread-Based Concurrency”Module 1: Threads and Ownership
- Spawning threads with std::thread
- Move closures and thread ownership
- JoinHandle and thread lifecycle
- Hands-on: Build a parallel file processor
Module 2: Message Passing with Channels
- mpsc channels (multi-producer, single-consumer)
- Sending data between threads safely
- Channel patterns: fan-out, pipeline, broadcast
- Hands-on: Build a producer-consumer pipeline
Module 3: Shared State Concurrency
- Mutex and RwLock for synchronized access
- Arc for shared ownership across threads
- Deadlock prevention and lock ordering
- Hands-on: Build a concurrent cache
Module 4: Atomic Types and Lock-Free Programming
- Atomic primitives (AtomicBool, AtomicUsize, etc.)
- Memory ordering (Relaxed, Acquire, Release, SeqCst)
- Compare-and-swap operations
- Hands-on: Implement a lock-free counter and flag
Day 2: Async Programming Foundations
Section titled “Day 2: Async Programming Foundations”Module 5: Futures and the Async Model
- What is a Future and how polling works
- Async/await syntax and desugaring
- Pin and Unpin explained
- Hands-on: Implement a simple future from scratch
Module 6: The Tokio Runtime
- Tokio multi-threaded and current-thread runtimes
- Task spawning with tokio::spawn
- Task scheduling and cooperative yielding
- Hands-on: Set up a Tokio application with proper runtime configuration
Module 7: Async I/O
- Async TCP and UDP with tokio::net
- Async file I/O with tokio::fs
- Buffered readers and writers
- Hands-on: Build an async TCP echo server
Module 8: Async Synchronization
- tokio::sync primitives (Mutex, RwLock, Semaphore)
- Notify and Barrier for coordination
- Watch and broadcast channels
- Hands-on: Build a rate limiter with async semaphore
Day 3: Advanced Async Patterns and Production Use
Section titled “Day 3: Advanced Async Patterns and Production Use”Module 9: Streams and Async Iteration
- The Stream trait and StreamExt
- Creating streams from iterators and channels
- Buffering, merging, and selecting streams
- Hands-on: Build a real-time event processing pipeline
Module 10: Error Handling in Async Code
- Propagating errors through async call chains
- Timeout and retry patterns
- Graceful shutdown with CancellationToken
- Hands-on: Add timeout, retry, and shutdown to a service
Module 11: Concurrent Task Patterns
- join!, select!, and tokio::select!
- Spawning task groups with JoinSet
- Structured concurrency patterns
- Hands-on: Build a concurrent web scraper
Module 12: Testing and Debugging Async Code
- tokio::test and async test patterns
- Tracing and tokio-console for debugging
- Profiling async task execution
- Hands-on: Add tracing and write async tests for your service
Prerequisites
Section titled “Prerequisites”- Completion of Rust Fundamentals or equivalent experience
- Solid understanding of ownership, borrowing, and lifetimes
- Experience with traits and generics
- Basic understanding of networking concepts is helpful
Delivery Formats
Section titled “Delivery Formats”| Format | Description |
|---|---|
| In-Person | On-site at your company’s location, hands-on with direct interaction |
| Live Online | Interactive virtual sessions with screen sharing and real-time labs |
| Hybrid | Combination of on-site and remote sessions, flexible scheduling |
All formats include hands-on labs, course materials, and post-training support.