import Synchronization @MainActor final class SomeProxy { func foo() {} } struct SomeProxyClient { var setProxy: @Sendable (SomeProxy) -> Void var foo: @MainActor @Sendable () -> Void static let liveValue: Self = { let _proxy = Mutex<SomeProxy?>(nil) return Self( setProxy: { proxy in _proxy.withLock { $0 = proxy } }, foo: { _proxy.withLock { $0?.foo() } } ) }() }