(self: FiberMap<K, A, E>)
| 545 | never, |
| 546 | R |
| 547 | > = <K, A, E>(self: FiberMap<K, A, E>) => <R>() => |
| 548 | Effect.map( |
| 549 | Effect.runtime<R>(), |
| 550 | (runtime) => { |
| 551 | const runFork = Runtime.runFork(runtime) |
| 552 | return <XE extends E, XA extends A>( |
| 553 | key: K, |
| 554 | effect: Effect.Effect<XA, XE, R>, |
| 555 | options?: |
| 556 | | Runtime.RunForkOptions & { |
| 557 | readonly onlyIfMissing?: boolean | undefined |
| 558 | readonly propagateInterruption?: boolean | undefined |
| 559 | } |
| 560 | | undefined |
| 561 | ) => { |
| 562 | if (self.state._tag === "Closed") { |
| 563 | return constInterruptedFiber() |
| 564 | } else if (options?.onlyIfMissing === true && unsafeHas(self, key)) { |
| 565 | return constInterruptedFiber() |
| 566 | } |
| 567 | const fiber = runFork(effect, options) |
| 568 | unsafeSet(self, key, fiber, options) |
| 569 | return fiber |
| 570 | } |
| 571 | } |
| 572 | ) |
| 573 | |
| 574 | /** |
| 575 | * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberMap. |
no test coverage detected