I've been thinking about this one for a long time. There is subtly here, but I tried my best to keep it short. I don't think you should use MainActor as the default isolation.
| GitHub | https://github.com/jdanthinne |
| Work | https://www.neopixl.com/ |
| GitHub | https://github.com/jdanthinne |
| Work | https://www.neopixl.com/ |
I've been thinking about this one for a long time. There is subtly here, but I tried my best to keep it short. I don't think you should use MainActor as the default isolation.
@mattiem What I don't really like is the fact that the two tasks are launched in parallel and I'm afraid the stream is not fully "ready" yet when the second task performs.
But, from my tests, everything seems fine on this side BUT there seems to be some sort of flakiness when the second task has itself some kind of same stream going on inside (with the same unsubscribe) and the parent stream ends, it seems to cancel the second task inside.