Factory
Factory copied to clipboard
Sendable conformance for `Container`
With Swift 5.10 released and Swift 6 on the horizon, consumers of Factory would expect Container
to conform to Sendable
as it is intended to be thread safe. However, since it contains a property of containerManager
, it's not possible to mark it as such:
Furthermore, when you attempt to conform ContainerManger
to sendable, you notice that it has publicly writable properties that are not protected, namely defaultScope
but also some other debug ones, so it cannot conform to Sendable
either:
To satisfy the Sendable
contract, ideally Container
and ContainerManager
would both have Sendable
conformances, though this might require an API rethink.