Files
Brandon Williams 7c6fb26700 Address @Shared sendability. (#3329)
* Address @Shared sendability.

* Undo UncheckedSendable<UserDefaults>.

* clean up

* wip

* drop AnySendable.

* wip

* Address `Effect.throttle` sendability (#3325)

* Address effect cancellation sendability (#3326)

* Address effect cancellation sendability

* fix

* wip

* wip

* Separate SendableDefaultSubscript from DefaultSubscript.

* fix test

* drop escaping

* switch on swift 6 language mode

* xcode 16

* update test

* wip

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2024-09-06 16:28:23 -04:00

21 lines
430 B
Swift

#if canImport(Combine)
import Combine
#endif
protocol Reference<Value>: AnyObject, CustomStringConvertible, Sendable {
associatedtype Value: Sendable
var value: Value { get set }
func access()
func withMutation<T>(_ mutation: () throws -> T) rethrows -> T
#if canImport(Combine)
var publisher: AnyPublisher<Value, Never> { get }
#endif
}
extension Reference {
var valueType: Any.Type {
Value.self
}
}