hmlongco / Factory

A new approach to Container-Based Dependency Injection for Swift and SwiftUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Concurrency-safe warnings when `strict-concurrency` is set to `complete`

JeroenBakker-wbd opened this issue Β· comments

commented

Hey, thanks for making this library. I really like using this πŸ˜„. Which is why I have a question related to strict-concurrency:

In preparation for Swift 6, we've enabled strict-concurrency to complete in our project. But then we noticed the Container.shared is not concurrency-safe due to it being mutable.

concurrency

Are there plans for making Factory concurrency safe for the compiler?

Under most cases Factory is concurrency safe as it does its own locking mechanisms for registrations and resolutions and caching. I need to see what has to change other than that, but there could be issues with statics that I'm not sure how to resolve at the moment.

See the discussion #112