MCPcopy Create free account
hub / github.com/Effect-TS/effect / unsafeOffer

Method unsafeOffer

packages/effect/src/internal/pubsub.ts:1199–1210  ·  view source on GitHub ↗
(value: A)

Source from the content-addressed store, hash-verified

1197 }
1198
1199 unsafeOffer(value: A): boolean {
1200 if (MutableRef.get(this.shutdownFlag)) {
1201 return false
1202 }
1203
1204 if ((this.pubsub as AtomicPubSub<unknown>).publish(value)) {
1205 this.strategy.unsafeCompleteSubscribers(this.pubsub, this.subscribers)
1206 return true
1207 }
1208
1209 return false
1210 }
1211
1212 publishAll(elements: Iterable<A>): Effect.Effect<boolean> {
1213 return core.suspend(() => {

Callers

nothing calls this directly

Calls 3

getMethod · 0.65
publishMethod · 0.65

Tested by

no test coverage detected