What's the best way to close a broadcast channel? #7028
-
Hi everyone, I have the following pseudocode:
Where:
The main concern is on line The solution is to close the channel/sender, as I expect the lock to be released with a As we have the Sender as an instance variable of the struct, I am not sure how to drop it, also, there is no Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You can make the field an |
Beta Was this translation helpful? Give feedback.
You can make the field an
Option<Sender>