Commit 5ea3735
committed
Add method to stop Select
Add method to stop `Select` instance and cleanup any
pending task.
Select stores async tasks that listen on the receivers.
If select is removed without stopping the receivers tasks,
then we get error: Task was destroyed but it is pending!
We should stop all internal tasks before destoring Select.
Destructor can't be async, so we do that with extra method `stop`.
This method should be called when Select is no longer needed.
Signed-off-by: ela-kotulska-frequenz <[email protected]>1 parent 60e61bd commit 5ea3735
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
| |||
0 commit comments