Closed stanwolverine closed 1 year ago
Generally, to share a token between multiple tasks, you need to clone it. It would be good to include a bit about that. Also, I don't think your example compiles due to this issue.
@Darksonn You are right. My example was not compiling due to ownership rule. I have included token cloning in doc and code snippet.
Cancellation Tokens should be used to notify task to shut down instead of broadcast channels. Therefore, I replaced usage of Broadcast Channel in Telling things to shut down section of Graceful Shutdown topic docs with Cancellation Tokens
closes #694