(value: A)
| 1173 | } |
| 1174 | |
| 1175 | publish(value: A): Effect.Effect<boolean> { |
| 1176 | return core.suspend(() => { |
| 1177 | if (MutableRef.get(this.shutdownFlag)) { |
| 1178 | return core.interrupt |
| 1179 | } |
| 1180 | |
| 1181 | if (this.pubsub.publish(value)) { |
| 1182 | this.strategy.unsafeCompleteSubscribers(this.pubsub, this.subscribers) |
| 1183 | return core.succeed(true) |
| 1184 | } |
| 1185 | |
| 1186 | return this.strategy.handleSurplus( |
| 1187 | this.pubsub, |
| 1188 | this.subscribers, |
| 1189 | Chunk.of(value), |
| 1190 | this.shutdownFlag |
| 1191 | ) |
| 1192 | }) |
| 1193 | } |
| 1194 | |
| 1195 | isActive(): boolean { |
| 1196 | return !MutableRef.get(this.shutdownFlag) |
no test coverage detected