Commit 25e2e27
committed
emit flow events from the same thread
Small improvement where we get rid of emitting environment and
ssh connection trigger events from new coroutines. StateFlow in
Kotlin is a hot, conflated flow that keeps only the most recent value.
In other words we can immediately update the value without needing to
launch a new coroutine, and we won't block the current thread.1 parent e537c6a commit 25e2e27
1 file changed
+4
-8
lines changedLines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 279 | + | |
| 280 | + | |
283 | 281 | | |
284 | 282 | | |
285 | 283 | | |
| |||
312 | 310 | | |
313 | 311 | | |
314 | 312 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 313 | + | |
| 314 | + | |
319 | 315 | | |
320 | 316 | | |
321 | 317 | | |
| |||
0 commit comments