(elements: Iterable<A>)
| 1210 | } |
| 1211 | |
| 1212 | publishAll(elements: Iterable<A>): Effect.Effect<boolean> { |
| 1213 | return core.suspend(() => { |
| 1214 | if (MutableRef.get(this.shutdownFlag)) { |
| 1215 | return core.interrupt |
| 1216 | } |
| 1217 | const surplus = unsafePublishAll(this.pubsub, elements) |
| 1218 | this.strategy.unsafeCompleteSubscribers(this.pubsub, this.subscribers) |
| 1219 | if (Chunk.isEmpty(surplus)) { |
| 1220 | return core.succeed(true) |
| 1221 | } |
| 1222 | return this.strategy.handleSurplus( |
| 1223 | this.pubsub, |
| 1224 | this.subscribers, |
| 1225 | surplus, |
| 1226 | this.shutdownFlag |
| 1227 | ) |
| 1228 | }) |
| 1229 | } |
| 1230 | |
| 1231 | get subscribe(): Effect.Effect<Queue.Dequeue<A>, never, Scope.Scope> { |
| 1232 | const acquire = core.tap( |
no test coverage detected