Closed DoubleREW closed 2 years ago
@hmlongco can you take a look at this? I'm running into the same issue when trying to inject classes annotated with global actors. Thanks!
If you register it on the main thread it works. I don't know if this could have some contraindications...
First of all, thank you for your project, well-documented and easy to use.
I'm playing with the new Swift 5.5 structured concurrency, but I don't find how to register into a container a factory for a class marked with the attribute
@MainActor
. I've pushed a little sample project that explains the problem: https://github.com/DoubleREW/SampleWithActorsAndResolverFirstViewModel is marked with attribute
@MainActor
and it's not registrable. SecondViewModel, instead, uses@MainActor
attribute on properties and functions only, so doesn't prevent the build.