Closed Zoha131 closed 1 year ago
This was discussed at some length in Factory. The two solutions are to a) don't do that, or b) mark your init as nonisolated.
The best solution is a) don't mark the entire class as @MainActor. It's usually not necessary. Just mark the async functions @MainActor as needed.
When I try to register an object which is marked as
@MainActor
then it gives the following errorIs it possible to support this kind of register method?