comprehensive-rust
comprehensive-rust copied to clipboard
Add slide to async about graceful shutdown
My initial draft of the cancellation slide mentioned graceful shutdown as a way to handle cleanup. After some more thought, it seems better as its own slide, most likely under "control flow". Such a slide might cover:
- Motivation for implementing graceful shutdown
- Relationship to cancellation and lack of async
Drop
- Common patterns for signaling shutdown (closing channels, tokio_util::sync::CancellationToken
We don't talk about a parallel thing for sync concurrency (aside from joining threads). Is there time to cover this in the session? Is it "too much" for students to grasp?
I've been mulling this over and have two reasons that this isn't a good fit (at least for now)... First, I think it starts to push into topics like building systems and designing APIs, which feel beyond the scope of this course. Second, there's other material that feels more relevant (e.g. streams?).
I agree with both of those reasons!