comprehensive-rust icon indicating copy to clipboard operation
comprehensive-rust copied to clipboard

Add slide to async about graceful shutdown

Open mauvealerts opened this issue 1 year ago • 1 comments

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

mauvealerts avatar May 31 '23 21:05 mauvealerts

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?

djmitche avatar Jun 01 '23 13:06 djmitche

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?).

mauvealerts avatar Jun 02 '23 11:06 mauvealerts

I agree with both of those reasons!

djmitche avatar Jun 02 '23 13:06 djmitche