Post #1839165
2026-04-07 08:41 UTC
@akbashev @mattiem MainActor-isolation doesn't help for tests, I think. It anything, it causes MainActor contention if all your tests are running in parallel, and trying to run on the MainActor.
I think it's a bit like the “If everything has to be Sendable, nothing makes sense as Sendable and it should be the only option." – if everything has to be MainActor, then it should be the default you opt out from. (but pls no, that mode is fraught with problems)
Replies (1)
-
@rhysmorgan@mastodon.social 2026-04-07 10:31
@akbashev @mattiem I guess it does mean your ViewModel is running on different isolation domains in prod and in testing, but that might be totally OK and allow you to run tests in parallel that otherwise would be contending for access to the MainActor. Now they can truly run in parallel with no dependency on the MainActor at all.