in MobiusCore/Source/ConnectablePublisher.swift [23:42]
func post(_ value: Value) {
let connections: [Connection<Value>] = access.guard {
guard !disposed else {
// Callers are responsible for ensuring post is never entered after dispose.
MobiusHooks.errorHandler(
"ConnectablePublisher<\(Value.self)> cannot accept values when disposed",
#file,
#line
)
}
currentValue = value
return Array(self.connections.values)
}
// Note that we froze the list of connections in the sync block, but dispatch accept here to avoid any
// risk of recursion.
connections.forEach { $0.accept(value) }
}