We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8784f76 commit fdad435Copy full SHA for fdad435
Sources/ComposableArchitecture/Internal/CurrentValueRelay.swift
@@ -33,10 +33,11 @@ final class CurrentValueRelay<Output>: Publisher {
33
}
34
35
func send(_ value: Output) {
36
- self.lock.sync {
+ let subscriptions = self.lock.sync {
37
self.currentValue = value
38
+ return self.subscriptions
39
- for subscription in self.lock.sync({ self.subscriptions }) {
40
+ for subscription in subscriptions {
41
subscription.receive(value)
42
43
0 commit comments