@fncts/io 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cached/api.d.ts +1 -1
- package/Channel/api.d.ts +80 -80
- package/Channel/core-api.d.ts +26 -26
- package/Console/definition.d.ts +1 -0
- package/CountdownLatch.d.ts +1 -0
- package/Fiber/FiberMessage.d.ts +6 -28
- package/Fiber/FiberRuntime.d.ts +108 -77
- package/Fiber/api/interruptAs.d.ts +2 -2
- package/Fiber/definition.d.ts +2 -0
- package/FiberScope/definition.d.ts +3 -0
- package/FiberSet.d.ts +2 -1
- package/Future/State.d.ts +59 -0
- package/Future/api.d.ts +8 -3
- package/Future/constructors.d.ts +1 -1
- package/Future/definition.d.ts +1 -17
- package/Future.d.ts +1 -0
- package/Hub/api.d.ts +15 -15
- package/IO/api/array.d.ts +22 -0
- package/IO/api/awaitAllChildren.d.ts +6 -0
- package/IO/api/cachedInvalidate.d.ts +15 -0
- package/IO/api/forkDaemon.d.ts +1 -1
- package/IO/api/onTermination.d.ts +1 -2
- package/IO/api/transplant.d.ts +11 -1
- package/IO/api.d.ts +247 -225
- package/IO/definition.d.ts +12 -25
- package/IO.d.ts +3 -1
- package/Random/definition.d.ts +1 -0
- package/Ref/Synchronized/api.d.ts +1 -1
- package/Semaphore/Reservation.d.ts +15 -0
- package/Semaphore/constructors.d.ts +13 -0
- package/Semaphore/definition.d.ts +29 -0
- package/Semaphore.d.ts +3 -40
- package/Stream/api.d.ts +164 -164
- package/_cjs/Cached/api.cjs +1 -2
- package/_cjs/Cached/api.cjs.map +1 -1
- package/_cjs/Cached/internal.cjs +1 -2
- package/_cjs/Cached/internal.cjs.map +1 -1
- package/_cjs/Channel/api/interruptWhen.cjs +1 -2
- package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs +2 -3
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAll.cjs +1 -2
- package/_cjs/Channel/api/mergeAll.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs +1 -2
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +2 -3
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeMap.cjs +1 -2
- package/_cjs/Channel/api/mergeMap.cjs.map +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +1 -2
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api/run.cjs +1 -2
- package/_cjs/Channel/api/run.cjs.map +1 -1
- package/_cjs/Channel/api/runCollect.cjs +1 -2
- package/_cjs/Channel/api/runCollect.cjs.map +1 -1
- package/_cjs/Channel/api/runDrain.cjs +1 -2
- package/_cjs/Channel/api/runDrain.cjs.map +1 -1
- package/_cjs/Channel/api/runScoped.cjs +3 -4
- package/_cjs/Channel/api/runScoped.cjs.map +1 -1
- package/_cjs/Channel/api/toPull.cjs +2 -3
- package/_cjs/Channel/api/toPull.cjs.map +1 -1
- package/_cjs/Channel/api/zipConcurrent.cjs +1 -2
- package/_cjs/Channel/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +206 -207
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/core-api.cjs +43 -42
- package/_cjs/Channel/core-api.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +4 -5
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelState.cjs +1 -2
- package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +1 -2
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Clock/api.cjs +1 -2
- package/_cjs/Clock/api.cjs.map +1 -1
- package/_cjs/Clock/definition.cjs +1 -2
- package/_cjs/Clock/definition.cjs.map +1 -1
- package/_cjs/Clock/live.cjs +1 -2
- package/_cjs/Clock/live.cjs.map +1 -1
- package/_cjs/Console/api.cjs +1 -2
- package/_cjs/Console/api.cjs.map +1 -1
- package/_cjs/Console/definition.cjs +2 -2
- package/_cjs/Console/definition.cjs.map +1 -1
- package/_cjs/Console/live.cjs +1 -2
- package/_cjs/Console/live.cjs.map +1 -1
- package/_cjs/CountdownLatch.cjs +3 -3
- package/_cjs/CountdownLatch.cjs.map +1 -1
- package/_cjs/Differ/api.cjs +1 -2
- package/_cjs/Differ/api.cjs.map +1 -1
- package/_cjs/Fiber/FiberMessage.cjs +3 -24
- package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +879 -636
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/api/awaitAll.cjs +1 -2
- package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
- package/_cjs/Fiber/api/collectAll.cjs +2 -3
- package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
- package/_cjs/Fiber/api/fromIO.cjs +1 -2
- package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
- package/_cjs/Fiber/api/interrupt.cjs +2 -3
- package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAll.cjs +2 -3
- package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAs.cjs +5 -10
- package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptFork.cjs +2 -3
- package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
- package/_cjs/Fiber/api/join.cjs +1 -2
- package/_cjs/Fiber/api/join.cjs.map +1 -1
- package/_cjs/Fiber/api/joinAll.cjs +1 -2
- package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
- package/_cjs/Fiber/api/mapFiber.cjs +1 -2
- package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
- package/_cjs/Fiber/api/mapIO.cjs +2 -3
- package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
- package/_cjs/Fiber/api/zipWith.cjs +2 -3
- package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
- package/_cjs/Fiber/constructors.cjs +2 -3
- package/_cjs/Fiber/constructors.cjs.map +1 -1
- package/_cjs/Fiber/definition.cjs +6 -4
- package/_cjs/Fiber/definition.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScoped.cjs +1 -2
- package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScopedWith.cjs +1 -2
- package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
- package/_cjs/FiberRef/constructors.cjs +1 -2
- package/_cjs/FiberRef/constructors.cjs.map +1 -1
- package/_cjs/FiberRef/definition.cjs +1 -2
- package/_cjs/FiberRef/definition.cjs.map +1 -1
- package/_cjs/FiberRef/operations.cjs +1 -2
- package/_cjs/FiberRef/operations.cjs.map +1 -1
- package/_cjs/FiberRef/unsafe.cjs +1 -2
- package/_cjs/FiberRef/unsafe.cjs.map +1 -1
- package/_cjs/FiberRefs/Patch.cjs +1 -2
- package/_cjs/FiberRefs/Patch.cjs.map +1 -1
- package/_cjs/FiberRefs/api.cjs +1 -2
- package/_cjs/FiberRefs/api.cjs.map +1 -1
- package/_cjs/FiberRefs/definition.cjs +1 -2
- package/_cjs/FiberRefs/definition.cjs.map +1 -1
- package/_cjs/FiberScope/definition.cjs +29 -6
- package/_cjs/FiberScope/definition.cjs.map +1 -1
- package/_cjs/FiberSet.cjs +16 -15
- package/_cjs/FiberSet.cjs.map +1 -1
- package/_cjs/FiberStatus/definition.cjs +1 -2
- package/_cjs/FiberStatus/definition.cjs.map +1 -1
- package/_cjs/Future/State.cjs +108 -0
- package/_cjs/Future/State.cjs.map +1 -0
- package/_cjs/Future/api.cjs +71 -64
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Future/constructors.cjs +3 -4
- package/_cjs/Future/constructors.cjs.map +1 -1
- package/_cjs/Future/definition.cjs +1 -15
- package/_cjs/Future/definition.cjs.map +1 -1
- package/_cjs/Future.cjs +11 -0
- package/_cjs/Future.cjs.map +1 -1
- package/_cjs/Hub/api.cjs +56 -57
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +1 -2
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/acquireRelease.cjs +1 -2
- package/_cjs/IO/api/acquireRelease.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseExit.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseExit.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptible.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseInterruptible.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizer.cjs +1 -2
- package/_cjs/IO/api/addFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizerExit.cjs +1 -2
- package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/all.cjs +1 -2
- package/_cjs/IO/api/all.cjs.map +1 -1
- package/_cjs/IO/api/array.cjs +51 -0
- package/_cjs/IO/api/array.cjs.map +1 -0
- package/_cjs/IO/api/asyncIO.cjs +1 -2
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/asyncInterrupt.cjs +1 -2
- package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
- package/_cjs/IO/api/awaitAllChildren.cjs +17 -0
- package/_cjs/IO/api/awaitAllChildren.cjs.map +1 -0
- package/_cjs/IO/api/blocking.cjs +1 -2
- package/_cjs/IO/api/blocking.cjs.map +1 -1
- package/_cjs/IO/api/bracket.cjs +1 -2
- package/_cjs/IO/api/bracket.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +1 -2
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/cachedInvalidate.cjs +47 -0
- package/_cjs/IO/api/cachedInvalidate.cjs.map +1 -0
- package/_cjs/IO/api/clockWith.cjs +1 -2
- package/_cjs/IO/api/clockWith.cjs.map +1 -1
- package/_cjs/IO/api/concurrency.cjs +1 -2
- package/_cjs/IO/api/concurrency.cjs.map +1 -1
- package/_cjs/IO/api/concurrentFinalizers.cjs +1 -2
- package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
- package/_cjs/IO/api/consoleWith.cjs +1 -2
- package/_cjs/IO/api/consoleWith.cjs.map +1 -1
- package/_cjs/IO/api/daemonChildren.cjs +1 -2
- package/_cjs/IO/api/daemonChildren.cjs.map +1 -1
- package/_cjs/IO/api/delay.cjs +1 -2
- package/_cjs/IO/api/delay.cjs.map +1 -1
- package/_cjs/IO/api/descriptor.cjs +1 -2
- package/_cjs/IO/api/descriptor.cjs.map +1 -1
- package/_cjs/IO/api/diffFiberRefs.cjs +1 -2
- package/_cjs/IO/api/diffFiberRefs.cjs.map +1 -1
- package/_cjs/IO/api/disconnect.cjs +2 -3
- package/_cjs/IO/api/disconnect.cjs.map +1 -1
- package/_cjs/IO/api/ensuringChildren.cjs +1 -2
- package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
- package/_cjs/IO/api/environment.cjs +1 -2
- package/_cjs/IO/api/environment.cjs.map +1 -1
- package/_cjs/IO/api/foreachConcurrent.cjs +36 -30
- package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -1
- package/_cjs/IO/api/foreachExec.cjs +1 -2
- package/_cjs/IO/api/foreachExec.cjs.map +1 -1
- package/_cjs/IO/api/fork.cjs +2 -3
- package/_cjs/IO/api/fork.cjs.map +1 -1
- package/_cjs/IO/api/forkAll.cjs +1 -2
- package/_cjs/IO/api/forkAll.cjs.map +1 -1
- package/_cjs/IO/api/forkDaemon.cjs +5 -6
- package/_cjs/IO/api/forkDaemon.cjs.map +1 -1
- package/_cjs/IO/api/forkIn.cjs +1 -2
- package/_cjs/IO/api/forkIn.cjs.map +1 -1
- package/_cjs/IO/api/forkScoped.cjs +1 -2
- package/_cjs/IO/api/forkScoped.cjs.map +1 -1
- package/_cjs/IO/api/fulfill.cjs +1 -2
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +4 -5
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/memoize.cjs +1 -2
- package/_cjs/IO/api/memoize.cjs.map +1 -1
- package/_cjs/IO/api/onTermination.cjs +2 -3
- package/_cjs/IO/api/onTermination.cjs.map +1 -1
- package/_cjs/IO/api/once.cjs +1 -2
- package/_cjs/IO/api/once.cjs.map +1 -1
- package/_cjs/IO/api/patchFiberRefs.cjs +1 -2
- package/_cjs/IO/api/patchFiberRefs.cjs.map +1 -1
- package/_cjs/IO/api/provideLayer.cjs +1 -2
- package/_cjs/IO/api/provideLayer.cjs.map +1 -1
- package/_cjs/IO/api/provideScope.cjs +1 -2
- package/_cjs/IO/api/provideScope.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeLayer.cjs +1 -2
- package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeRuntime.cjs +1 -2
- package/_cjs/IO/api/provideSomeRuntime.cjs.map +1 -1
- package/_cjs/IO/api/race.cjs +2 -3
- package/_cjs/IO/api/race.cjs.map +1 -1
- package/_cjs/IO/api/raceFirst.cjs +1 -2
- package/_cjs/IO/api/raceFirst.cjs.map +1 -1
- package/_cjs/IO/api/raceWith.cjs +1 -2
- package/_cjs/IO/api/raceWith.cjs.map +1 -1
- package/_cjs/IO/api/randomWith.cjs +1 -2
- package/_cjs/IO/api/randomWith.cjs.map +1 -1
- package/_cjs/IO/api/repeat.cjs +1 -2
- package/_cjs/IO/api/repeat.cjs.map +1 -1
- package/_cjs/IO/api/retry.cjs +1 -2
- package/_cjs/IO/api/retry.cjs.map +1 -1
- package/_cjs/IO/api/schedule.cjs +1 -2
- package/_cjs/IO/api/schedule.cjs.map +1 -1
- package/_cjs/IO/api/scope.cjs +1 -2
- package/_cjs/IO/api/scope.cjs.map +1 -1
- package/_cjs/IO/api/scopeWith.cjs +1 -2
- package/_cjs/IO/api/scopeWith.cjs.map +1 -1
- package/_cjs/IO/api/scoped.cjs +1 -2
- package/_cjs/IO/api/scoped.cjs.map +1 -1
- package/_cjs/IO/api/sleep.cjs +1 -2
- package/_cjs/IO/api/sleep.cjs.map +1 -1
- package/_cjs/IO/api/stateful.cjs +1 -2
- package/_cjs/IO/api/stateful.cjs.map +1 -1
- package/_cjs/IO/api/supervised.cjs +1 -2
- package/_cjs/IO/api/supervised.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +9 -11
- package/_cjs/IO/api/timeout.cjs.map +1 -1
- package/_cjs/IO/api/transplant.cjs +22 -7
- package/_cjs/IO/api/transplant.cjs.map +1 -1
- package/_cjs/IO/api/whenFiberRef.cjs +1 -2
- package/_cjs/IO/api/whenFiberRef.cjs.map +1 -1
- package/_cjs/IO/api/whenRef.cjs +1 -2
- package/_cjs/IO/api/whenRef.cjs.map +1 -1
- package/_cjs/IO/api/withChildren.cjs +1 -2
- package/_cjs/IO/api/withChildren.cjs.map +1 -1
- package/_cjs/IO/api/withEarlyRelease.cjs +1 -2
- package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizer.cjs +1 -2
- package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizerExit.cjs +1 -2
- package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs +5 -6
- package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/IO/api.cjs +522 -473
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +2 -3
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +9 -10
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/IO.cjs +33 -11
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/IOEnv/definition.cjs +1 -2
- package/_cjs/IOEnv/definition.cjs.map +1 -1
- package/_cjs/IOEnv/live.cjs +1 -2
- package/_cjs/IOEnv/live.cjs.map +1 -1
- package/_cjs/IOEnv/services.cjs +1 -2
- package/_cjs/IOEnv/services.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +1 -2
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +1 -2
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Logger/api.cjs +1 -2
- package/_cjs/Logger/api.cjs.map +1 -1
- package/_cjs/Logger/constructors.cjs +1 -2
- package/_cjs/Logger/constructors.cjs.map +1 -1
- package/_cjs/MVar/api.cjs +1 -2
- package/_cjs/MVar/api.cjs.map +1 -1
- package/_cjs/Push/api.cjs +2 -3
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Push/internal.cjs +1 -2
- package/_cjs/Push/internal.cjs.map +1 -1
- package/_cjs/Queue/api/dimapIO.cjs +1 -2
- package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +1 -2
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +1 -2
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Queue/api/poll.cjs +1 -2
- package/_cjs/Queue/api/poll.cjs.map +1 -1
- package/_cjs/Queue/api/takeBetween.cjs +1 -2
- package/_cjs/Queue/api/takeBetween.cjs.map +1 -1
- package/_cjs/Queue/api/takeN.cjs +1 -2
- package/_cjs/Queue/api/takeN.cjs.map +1 -1
- package/_cjs/Queue/api/zipWithIO.cjs +1 -2
- package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
- package/_cjs/Queue/constructors.cjs +1 -2
- package/_cjs/Queue/constructors.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +1 -2
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Queue/strategy.cjs +1 -2
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Random/api.cjs +1 -2
- package/_cjs/Random/api.cjs.map +1 -1
- package/_cjs/Random/definition.cjs +2 -2
- package/_cjs/Random/definition.cjs.map +1 -1
- package/_cjs/Random/live.cjs +1 -2
- package/_cjs/Random/live.cjs.map +1 -1
- package/_cjs/Ref/Atomic.cjs +1 -2
- package/_cjs/Ref/Atomic.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs +1 -2
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs +1 -2
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/api.cjs +2 -3
- package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/constructors.cjs +2 -3
- package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/definition.cjs +2 -3
- package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
- package/_cjs/Ref/api/collect.cjs +1 -2
- package/_cjs/Ref/api/collect.cjs.map +1 -1
- package/_cjs/Ref/api/dimap.cjs +1 -2
- package/_cjs/Ref/api/dimap.cjs.map +1 -1
- package/_cjs/Ref/api/filter.cjs +1 -2
- package/_cjs/Ref/api/filter.cjs.map +1 -1
- package/_cjs/Ref/api/modify.cjs +1 -2
- package/_cjs/Ref/api/modify.cjs.map +1 -1
- package/_cjs/Ref/api.cjs +1 -2
- package/_cjs/Ref/api.cjs.map +1 -1
- package/_cjs/Ref/constructors.cjs +1 -2
- package/_cjs/Ref/constructors.cjs.map +1 -1
- package/_cjs/RefSubject/Atomic.cjs +1 -2
- package/_cjs/RefSubject/Atomic.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/api.cjs +1 -2
- package/_cjs/RefSubject/Synchronized/api.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/definition.cjs +1 -2
- package/_cjs/RefSubject/Synchronized/definition.cjs.map +1 -1
- package/_cjs/RefSubject/api.cjs +1 -2
- package/_cjs/RefSubject/api.cjs.map +1 -1
- package/_cjs/Reloadable/api.cjs +1 -2
- package/_cjs/Reloadable/api.cjs.map +1 -1
- package/_cjs/Reloadable/constructors.cjs +1 -2
- package/_cjs/Reloadable/constructors.cjs.map +1 -1
- package/_cjs/Reloadable/definition.cjs +1 -2
- package/_cjs/Reloadable/definition.cjs.map +1 -1
- package/_cjs/RuntimeFlags/Patch.cjs +1 -2
- package/_cjs/RuntimeFlags/Patch.cjs.map +1 -1
- package/_cjs/RuntimeFlags/RuntimeFlags.cjs +1 -2
- package/_cjs/RuntimeFlags/RuntimeFlags.cjs.map +1 -1
- package/_cjs/STM/api/atomically.cjs +1 -2
- package/_cjs/STM/api/atomically.cjs.map +1 -1
- package/_cjs/STM/api/core-api.cjs +1 -2
- package/_cjs/STM/api/core-api.cjs.map +1 -1
- package/_cjs/STM/api.cjs +1 -2
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs +2 -3
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +1 -2
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/CommitState.cjs +1 -2
- package/_cjs/STM/internal/CommitState.cjs.map +1 -1
- package/_cjs/STM/internal/Journal.cjs +1 -2
- package/_cjs/STM/internal/Journal.cjs.map +1 -1
- package/_cjs/Schedule/Decision.cjs +1 -2
- package/_cjs/Schedule/Decision.cjs.map +1 -1
- package/_cjs/Schedule/api/driver.cjs +1 -2
- package/_cjs/Schedule/api/driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +1 -2
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Scope/Finalizer/definition.cjs +1 -2
- package/_cjs/Scope/Finalizer/definition.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/constructors.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/constructors.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/definition.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
- package/_cjs/Scope/api.cjs +1 -2
- package/_cjs/Scope/api.cjs.map +1 -1
- package/_cjs/Scope/definition.cjs +1 -2
- package/_cjs/Scope/definition.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +2 -3
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/Semaphore/Reservation.cjs +24 -0
- package/_cjs/Semaphore/Reservation.cjs.map +1 -0
- package/_cjs/Semaphore/constructors.cjs +25 -0
- package/_cjs/Semaphore/constructors.cjs.map +1 -0
- package/_cjs/Semaphore/definition.cjs +149 -0
- package/_cjs/Semaphore/definition.cjs.map +1 -0
- package/_cjs/Semaphore.cjs +31 -138
- package/_cjs/Semaphore.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +1 -2
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/State/api.cjs +1 -2
- package/_cjs/State/api.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +1 -2
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWith.cjs +1 -2
- package/_cjs/Stream/api/zipWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +1 -2
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +702 -703
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +1 -2
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/Pull.cjs +1 -2
- package/_cjs/Stream/internal/Pull.cjs.map +1 -1
- package/_cjs/Stream/internal/Take.cjs +1 -2
- package/_cjs/Stream/internal/Take.cjs.map +1 -1
- package/_cjs/Stream/internal/util.cjs +1 -2
- package/_cjs/Stream/internal/util.cjs.map +1 -1
- package/_cjs/Subject/Atomic.cjs +1 -2
- package/_cjs/Subject/Atomic.cjs.map +1 -1
- package/_cjs/Subject/api.cjs +1 -2
- package/_cjs/Subject/api.cjs.map +1 -1
- package/_cjs/SubscriptionRef.cjs +2 -3
- package/_cjs/SubscriptionRef.cjs.map +1 -1
- package/_cjs/Supervisor/api.cjs +1 -2
- package/_cjs/Supervisor/api.cjs.map +1 -1
- package/_cjs/Supervisor/constructors.cjs +1 -2
- package/_cjs/Supervisor/constructors.cjs.map +1 -1
- package/_cjs/Supervisor/definition.cjs +1 -2
- package/_cjs/Supervisor/definition.cjs.map +1 -1
- package/_cjs/SupervisorPatch.cjs +1 -2
- package/_cjs/SupervisorPatch.cjs.map +1 -1
- package/_cjs/TExit/definition.cjs +1 -2
- package/_cjs/TExit/definition.cjs.map +1 -1
- package/_cjs/TFuture/api.cjs +1 -2
- package/_cjs/TFuture/api.cjs.map +1 -1
- package/_cjs/TFuture/constructors.cjs +1 -2
- package/_cjs/TFuture/constructors.cjs.map +1 -1
- package/_cjs/TFuture/definition.cjs +1 -2
- package/_cjs/TFuture/definition.cjs.map +1 -1
- package/_cjs/TReentrantLock/api.cjs +1 -2
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TReentrantLock/definition.cjs +1 -2
- package/_cjs/TReentrantLock/definition.cjs.map +1 -1
- package/_cjs/TRef/api.cjs +1 -2
- package/_cjs/TRef/api.cjs.map +1 -1
- package/_cjs/TRef/constructors.cjs +1 -2
- package/_cjs/TRef/constructors.cjs.map +1 -1
- package/_cjs/TRef/definition.cjs +1 -2
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +1 -2
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/TSemaphore/constructors.cjs +1 -2
- package/_cjs/TSemaphore/constructors.cjs.map +1 -1
- package/_cjs/TSemaphore/definition.cjs +1 -2
- package/_cjs/TSemaphore/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/filterIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/findIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/mapIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
- package/_cjs/data/Exit/foreachIO.cjs +1 -2
- package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
- package/_cjs/internal/HashedPair.cjs +1 -2
- package/_cjs/internal/HashedPair.cjs.map +1 -1
- package/_cjs/internal/Hub.cjs +1 -2
- package/_cjs/internal/Hub.cjs.map +1 -1
- package/_cjs/internal/MutableQueue.cjs +1 -2
- package/_cjs/internal/MutableQueue.cjs.map +1 -1
- package/_cjs/internal/Scheduler.cjs +1 -2
- package/_cjs/internal/Scheduler.cjs.map +1 -1
- package/_cjs/internal/StackTraceBuilder.cjs +1 -2
- package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
- package/_mjs/Cached/api.mjs.map +1 -1
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +1 -1
- package/_mjs/Channel/api/runScoped.mjs +2 -2
- package/_mjs/Channel/api/runScoped.mjs.map +1 -1
- package/_mjs/Channel/api/toPull.mjs +1 -1
- package/_mjs/Channel/api/toPull.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +205 -205
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/core-api.mjs +43 -42
- package/_mjs/Channel/core-api.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +3 -3
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Console/definition.mjs +1 -0
- package/_mjs/Console/definition.mjs.map +1 -1
- package/_mjs/CountdownLatch.mjs +2 -1
- package/_mjs/CountdownLatch.mjs.map +1 -1
- package/_mjs/Fiber/FiberMessage.mjs +2 -20
- package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +877 -633
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/Fiber/api/collectAll.mjs +1 -1
- package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interrupt.mjs +1 -1
- package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAs.mjs +4 -7
- package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
- package/_mjs/Fiber/api/mapIO.mjs +1 -1
- package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
- package/_mjs/Fiber/api/zipWith.mjs +1 -1
- package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
- package/_mjs/Fiber/constructors.mjs +1 -1
- package/_mjs/Fiber/constructors.mjs.map +1 -1
- package/_mjs/Fiber/definition.mjs +5 -2
- package/_mjs/Fiber/definition.mjs.map +1 -1
- package/_mjs/FiberScope/definition.mjs +28 -4
- package/_mjs/FiberScope/definition.mjs.map +1 -1
- package/_mjs/FiberSet.mjs +14 -12
- package/_mjs/FiberSet.mjs.map +1 -1
- package/_mjs/Future/State.mjs +96 -0
- package/_mjs/Future/State.mjs.map +1 -0
- package/_mjs/Future/api.mjs +67 -61
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Future/constructors.mjs +3 -3
- package/_mjs/Future/constructors.mjs.map +1 -1
- package/_mjs/Future/definition.mjs +0 -12
- package/_mjs/Future/definition.mjs.map +1 -1
- package/_mjs/Future.mjs +1 -0
- package/_mjs/Future.mjs.map +1 -1
- package/_mjs/Hub/api.mjs +55 -55
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/IO/api/array.mjs +42 -0
- package/_mjs/IO/api/array.mjs.map +1 -0
- package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
- package/_mjs/IO/api/awaitAllChildren.mjs +10 -0
- package/_mjs/IO/api/awaitAllChildren.mjs.map +1 -0
- package/_mjs/IO/api/cachedInvalidate.mjs +39 -0
- package/_mjs/IO/api/cachedInvalidate.mjs.map +1 -0
- package/_mjs/IO/api/disconnect.mjs +1 -1
- package/_mjs/IO/api/disconnect.mjs.map +1 -1
- package/_mjs/IO/api/foreachConcurrent.mjs +35 -28
- package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -1
- package/_mjs/IO/api/fork.mjs +1 -1
- package/_mjs/IO/api/fork.mjs.map +1 -1
- package/_mjs/IO/api/forkDaemon.mjs +4 -4
- package/_mjs/IO/api/forkDaemon.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +3 -3
- package/_mjs/IO/api/onTermination.mjs +1 -1
- package/_mjs/IO/api/onTermination.mjs.map +1 -1
- package/_mjs/IO/api/race.mjs +1 -1
- package/_mjs/IO/api/race.mjs.map +1 -1
- package/_mjs/IO/api/timeout.mjs +8 -9
- package/_mjs/IO/api/timeout.mjs.map +1 -1
- package/_mjs/IO/api/transplant.mjs +19 -5
- package/_mjs/IO/api/transplant.mjs.map +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs +4 -4
- package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
- package/_mjs/IO/api.mjs +515 -468
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +1 -1
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +8 -8
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/IO.mjs +3 -1
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/IOEnv/definition.mjs.map +1 -1
- package/_mjs/Push/api.mjs +1 -1
- package/_mjs/Random/definition.mjs +1 -0
- package/_mjs/Random/definition.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/api.mjs +1 -1
- package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/constructors.mjs +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
- package/_mjs/STM/definition.mjs +1 -1
- package/_mjs/ScopedRef/api.mjs +1 -1
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/Semaphore/Reservation.mjs +16 -0
- package/_mjs/Semaphore/Reservation.mjs.map +1 -0
- package/_mjs/Semaphore/constructors.mjs +17 -0
- package/_mjs/Semaphore/constructors.mjs.map +1 -0
- package/_mjs/Semaphore/definition.mjs +141 -0
- package/_mjs/Semaphore/definition.mjs.map +1 -0
- package/_mjs/Semaphore.mjs +4 -133
- package/_mjs/Semaphore.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +701 -701
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/SubscriptionRef.mjs +1 -1
- package/_src/Cached/api.ts +3 -3
- package/_src/Channel/api/toPull.ts +1 -1
- package/_src/Channel/api.ts +273 -272
- package/_src/Channel/core-api.ts +57 -55
- package/_src/Channel/internal/ChannelExecutor.ts +3 -3
- package/_src/Console/definition.ts +1 -0
- package/_src/CountdownLatch.ts +2 -0
- package/_src/Fiber/FiberMessage.ts +3 -28
- package/_src/Fiber/FiberRuntime.ts +988 -616
- package/_src/Fiber/api/interruptAs.ts +4 -3
- package/_src/Fiber/constructors.ts +1 -1
- package/_src/Fiber/definition.ts +4 -0
- package/_src/FiberScope/definition.ts +40 -2
- package/_src/FiberSet.ts +6 -2
- package/_src/Future/State.ts +128 -0
- package/_src/Future/api.ts +62 -51
- package/_src/Future/constructors.ts +4 -2
- package/_src/Future/definition.ts +2 -17
- package/_src/Future.ts +4 -3
- package/_src/Hub/api.ts +61 -61
- package/_src/IO/api/addFinalizerExit.ts +4 -4
- package/_src/IO/api/array.ts +49 -0
- package/_src/IO/api/asyncInterrupt.ts +1 -1
- package/_src/IO/api/awaitAllChildren.ts +6 -0
- package/_src/IO/api/cachedInvalidate.ts +42 -0
- package/_src/IO/api/foreachConcurrent.ts +39 -23
- package/_src/IO/api/fork.ts +1 -1
- package/_src/IO/api/forkDaemon.ts +2 -2
- package/_src/IO/api/memoize.ts +3 -3
- package/_src/IO/api/onTermination.ts +2 -2
- package/_src/IO/api/transplant.ts +26 -3
- package/_src/IO/api/zipConcurrent.ts +2 -2
- package/_src/IO/api.ts +547 -525
- package/_src/IO/definition.ts +4 -28
- package/_src/IO/runtime.ts +0 -1
- package/_src/IO.ts +65 -63
- package/_src/IOEnv/definition.ts +1 -4
- package/_src/Random/definition.ts +1 -0
- package/_src/Ref/Synchronized/api.ts +2 -2
- package/_src/Ref/Synchronized/definition.ts +1 -1
- package/_src/Semaphore/Reservation.ts +15 -0
- package/_src/Semaphore/constructors.ts +14 -0
- package/_src/Semaphore/definition.ts +180 -0
- package/_src/Semaphore.ts +5 -159
- package/_src/Stream/api.ts +679 -679
- package/package.json +4 -4
- package/IO/api/sequenceT.d.ts +0 -26
- package/_cjs/IO/api/sequenceT.cjs +0 -18
- package/_cjs/IO/api/sequenceT.cjs.map +0 -1
- package/_mjs/IO/api/sequenceT.mjs +0 -10
- package/_mjs/IO/api/sequenceT.mjs.map +0 -1
- package/_src/IO/api/sequenceT.ts +0 -16
package/Fiber/FiberRuntime.d.ts
CHANGED
@@ -1,114 +1,145 @@
|
|
1
1
|
import { Fiber } from "@fncts/io/Fiber/definition";
|
2
|
-
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
3
|
-
import { FiberRefs } from "@fncts/io/FiberRefs";
|
4
|
-
import { List, Cons } from "@fncts/base/collection/immutable/List/definition";
|
5
2
|
import { Exit } from "@fncts/base/data/Exit/definition";
|
6
|
-
import { Stack } from "@fncts/base/internal/Stack";
|
7
3
|
import { IO } from "@fncts/io/IO/definition";
|
8
|
-
import { Future } from "@fncts/io/Future";
|
9
4
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
10
|
-
import {
|
11
|
-
import {
|
5
|
+
import { FiberRefs } from "@fncts/io/FiberRefs";
|
6
|
+
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
7
|
+
import { Maybe, Just } from "@fncts/base/data/Maybe/definition";
|
8
|
+
import { FiberScope } from "@fncts/io/FiberScope";
|
9
|
+
import { List, Cons } from "@fncts/base/collection/immutable/List/definition";
|
12
10
|
import { FiberRef } from "@fncts/io/FiberRef/definition";
|
13
|
-
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
14
|
-
import { IllegalStateError, NoSuchElementError, isInterruptedException } from "@fncts/base/data/exceptions";
|
15
11
|
import { TraceElement } from "@fncts/base/data/TraceElement/definition";
|
16
|
-
import {
|
12
|
+
import { Cause } from "@fncts/base/data/Cause/definition";
|
13
|
+
import { Supervisor } from "@fncts/io/Supervisor/definition";
|
17
14
|
import { LogLevel } from "@fncts/io/LogLevel";
|
18
15
|
import { Logger } from "@fncts/io/Logger/definition";
|
19
|
-
import
|
20
|
-
import
|
16
|
+
import { NoSuchElementError, IllegalStateError } from "@fncts/base/data/exceptions";
|
17
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
18
|
+
import type { OnSuccess, OnSuccessAndFailure, UIO, UpdateRuntimeFlags } from "../IO/definition.js";
|
21
19
|
import type { WhileLoop } from "../IO/definition.js";
|
22
20
|
import type { RuntimeFlags } from "../RuntimeFlags.js";
|
23
21
|
import { Trace } from "@fncts/base/data/Trace";
|
24
22
|
import { FiberTypeId, FiberVariance } from "@fncts/io/Fiber/definition";
|
25
|
-
import {
|
23
|
+
import { FiberStatus } from "../FiberStatus.js";
|
26
24
|
import { FiberMessage } from "./FiberMessage.js";
|
27
|
-
export
|
28
|
-
readonly patch: RuntimeFlags.Patch;
|
29
|
-
readonly trace?: string | undefined;
|
30
|
-
readonly _ioOpCode = IOTag.RevertFlags;
|
31
|
-
constructor(patch: RuntimeFlags.Patch, trace?: string | undefined);
|
32
|
-
}
|
33
|
-
export declare class UpdateTrace {
|
34
|
-
readonly trace?: string | undefined;
|
35
|
-
readonly _ioOpCode = IOTag.UpdateTrace;
|
36
|
-
constructor(trace?: string | undefined);
|
37
|
-
}
|
38
|
-
export type Continuation = OnSuccess | OnSuccessAndFailure | OnFailure | WhileLoop | UpdateTrace | RevertFlags;
|
25
|
+
export type Continuation = OnSuccess | OnSuccessAndFailure | WhileLoop | UpdateRuntimeFlags;
|
39
26
|
/**
|
40
27
|
* @tsplus type fncts.io.Fiber
|
41
28
|
*/
|
42
29
|
export declare class FiberRuntime<E, A> implements Fiber.Runtime<E, A> {
|
43
30
|
readonly fiberId: FiberId.Runtime;
|
44
31
|
readonly runtimeFlags0: RuntimeFlags;
|
32
|
+
readonly _tag = "RuntimeFiber";
|
45
33
|
readonly [FiberTypeId]: FiberTypeId;
|
46
34
|
[FiberVariance]: {
|
47
35
|
readonly _E: (_: never) => E;
|
48
36
|
readonly _A: (_: never) => A;
|
49
37
|
};
|
50
|
-
|
51
|
-
constructor(fiberId: FiberId.Runtime, fiberRefs0: FiberRefs, runtimeFlags0: RuntimeFlags);
|
52
|
-
private _fiberRefs;
|
53
|
-
private _runtimeFlags;
|
54
|
-
private queue;
|
55
|
-
private _children;
|
56
|
-
private observers;
|
57
|
-
private running;
|
58
|
-
private stack;
|
59
|
-
private asyncInterruptor;
|
60
|
-
private asyncTrace;
|
61
|
-
private asyncBlockinOn;
|
62
|
-
private _exitValue;
|
63
|
-
get id(): FiberId.Runtime;
|
64
|
-
ask<A>(f: (fiberRuntime: FiberRuntime<any, any>, status: FiberStatus) => A): UIO<A>;
|
38
|
+
location: string | undefined;
|
65
39
|
get await(): UIO<Exit<E, A>>;
|
66
40
|
get children(): UIO<Conc<FiberRuntime<any, any>>>;
|
67
41
|
get fiberRefs(): UIO<FiberRefs>;
|
42
|
+
get id(): FiberId.Runtime;
|
68
43
|
get inheritAll(): UIO<void>;
|
69
|
-
get runtimeFlags(): UIO<RuntimeFlags>;
|
70
|
-
interruptAsFork(fiberId: FiberId): UIO<void>;
|
71
|
-
getSupervisor(): Supervisor<any>;
|
72
44
|
get poll(): UIO<Maybe<Exit<E, A>>>;
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
private
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
45
|
+
get runtimeFlags(): UIO<RuntimeFlags>;
|
46
|
+
get scope(): import("../FiberScope.js").FiberScope;
|
47
|
+
get status(): UIO<FiberStatus>;
|
48
|
+
get trace(): UIO<Trace>;
|
49
|
+
private _asyncContWith;
|
50
|
+
private _blockingOn;
|
51
|
+
private _children;
|
52
|
+
private _exitValue;
|
53
|
+
private _fiberRefs;
|
54
|
+
private _forksSinceYield;
|
55
|
+
private _lastTrace;
|
56
|
+
private _runtimeFlags;
|
57
|
+
private _stack;
|
58
|
+
private _stackSize;
|
59
|
+
private inbox;
|
60
|
+
private observers;
|
61
|
+
private running;
|
62
|
+
constructor(fiberId: FiberId.Runtime, fiberRefs0: FiberRefs, runtimeFlags0: RuntimeFlags);
|
63
|
+
addChild(child: FiberRuntime<any, any>): void;
|
64
|
+
addChildren(children: Iterable<FiberRuntime<any, any>>): void;
|
84
65
|
addObserver(observer: (exit: Exit<E, A>) => void): void;
|
66
|
+
deleteFiberRef(ref: FiberRef<any>): void;
|
67
|
+
exitValue(): Exit<E, A> | null;
|
68
|
+
generateStackTrace(): Trace;
|
85
69
|
getChildren(): Set<FiberRuntime<any, any>>;
|
70
|
+
getFiberRef<A>(fiberRef: FiberRef<A>): A;
|
86
71
|
getFiberRefs(): FiberRefs;
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
72
|
+
getInterruptedCause(): Cause<never>;
|
73
|
+
getSupervisor(): Supervisor<any>;
|
74
|
+
interruptAs(fiberId: FiberId, __tsplusTrace?: string): UIO<Exit<E, A>>;
|
75
|
+
interruptAsFork(fiberId: FiberId, __tsplusTrace?: string): UIO<void>;
|
76
|
+
isAlive(): boolean;
|
77
|
+
isDone(): boolean;
|
78
|
+
isFatal(t: unknown): boolean;
|
79
|
+
isInterrupted(): boolean;
|
80
|
+
log(message: () => string, cause: Cause<any>, overrideLogLevel: Maybe<LogLevel>, trace?: string): void;
|
81
|
+
removeChild(child: FiberRuntime<any, any>): void;
|
82
|
+
removeObserver(observer: (exit: Exit<E, A>) => void): void;
|
83
|
+
resume<R>(effect: IO<R, E, A>): void;
|
84
|
+
runLoop(effect: IO.Concrete, minStackIndex: number, startStackIndex: number, currentDepth: number, currentOps: number): Exit<any, any> | null;
|
92
85
|
setFiberRef<A>(fiberRef: FiberRef<A>, value: A): void;
|
86
|
+
setFiberRefs(fiberRefs0: FiberRefs): void;
|
87
|
+
shouldYieldBeforeFork(): boolean;
|
88
|
+
start<R>(effect: IO<R, E, A>): import("@fncts/base/data/Exit").Exit<E, A> | null;
|
89
|
+
startConcurrently(io: IO<any, E, A>): void;
|
90
|
+
startFork<R>(effect: IO<R, E, A>): void;
|
91
|
+
startSuspended(): (io: IO<any, E, A>) => any;
|
92
|
+
tell(message: FiberMessage): void;
|
93
|
+
tellAddChild(child: FiberRuntime<any, any>): void;
|
94
|
+
tellAddChildren(children: Iterable<FiberRuntime<any, any>>): void;
|
95
|
+
tellInterrupt(cause: Cause<never>): void;
|
96
|
+
transferChildren(scope: FiberScope): void;
|
97
|
+
updateFiberRef<A>(fiberRef: FiberRef<A>, f: (a: A) => A): void;
|
93
98
|
private addInterruptedCause;
|
94
|
-
private
|
99
|
+
private awaitUnsafe;
|
100
|
+
private childrenChunk;
|
101
|
+
private drainQueueAfterAsync;
|
102
|
+
private drainQueueLaterOnExecutor;
|
103
|
+
private drainQueueOnCurrentThread;
|
104
|
+
private drainQueueWhileRunning;
|
105
|
+
private ensureStackCapacity;
|
106
|
+
private evaluateEffect;
|
95
107
|
private evaluateMessageWhileSuspended;
|
96
|
-
|
108
|
+
/**
|
109
|
+
* Removes references of entries from the stack higher than the current index
|
110
|
+
* so that they can be garbage collected.
|
111
|
+
*
|
112
|
+
* @note
|
113
|
+
* We only GC up to the {@link STACK_IDX_GC_THRESHOLD} index because
|
114
|
+
* we know that entries in indices higher than that have been auto-gc'd
|
115
|
+
* during the runloop
|
116
|
+
* @note
|
117
|
+
* This method MUST be invoked by the fiber itself while it's still running.
|
118
|
+
*/
|
119
|
+
private gcStack;
|
120
|
+
private getStatus;
|
121
|
+
private initiateAsync;
|
122
|
+
private interruptAllChildren;
|
123
|
+
private isInterruptible;
|
124
|
+
private patchRuntimeFlags;
|
125
|
+
private patchRuntimeFlagsOnly;
|
126
|
+
/**
|
127
|
+
* Sets the `_stackSize` to `nextStackIndex`.
|
128
|
+
*
|
129
|
+
* This method might also null out the entry in the stack to allow it to be
|
130
|
+
* GC'd, but only if the index is >= `FiberRuntime.StackIdxGcThreshold`.
|
131
|
+
*
|
132
|
+
* This is based on the assumption that when the stack is shallow, the entries
|
133
|
+
* in the array will keep being overwritten as the pointer moves up and down.
|
134
|
+
*/
|
135
|
+
private popStackFrame;
|
136
|
+
private processNewInterruptSignal;
|
137
|
+
private processStatefulMessage;
|
138
|
+
private pushStackFrame;
|
139
|
+
private run;
|
140
|
+
private sendInterruptSignalToAllChildren;
|
97
141
|
private setExitValue;
|
98
|
-
|
99
|
-
|
100
|
-
startFork<R>(effect: IO<R, E, A>): void;
|
101
|
-
updateFiberRef<A>(fiberRef: FiberRef<A>, f: (a: A) => A): void;
|
102
|
-
removeObserver(observer: (exit: Exit<E, A>) => void): void;
|
103
|
-
addChild(child: FiberRuntime<any, any>): void;
|
104
|
-
removeChild(child: FiberRuntime<any, any>): void;
|
105
|
-
get scope(): import("../FiberScope.js").FiberScope;
|
106
|
-
log(message: () => string, cause: Cause<any>, overrideLogLevel: Maybe<LogLevel>, trace?: string): void;
|
107
|
-
deleteFiberRef(ref: FiberRef<any>): void;
|
108
|
-
location: string | undefined;
|
109
|
-
get status(): UIO<FiberStatus>;
|
110
|
-
get trace(): UIO<Trace>;
|
111
|
-
getNextSuccessCont(): OnSuccessAndFailure | OnSuccess | WhileLoop | RevertFlags | UpdateTrace | undefined;
|
112
|
-
getNextFailCont(): OnSuccessAndFailure | OnFailure | RevertFlags | UpdateTrace | undefined;
|
113
|
-
isFatal(t: unknown): boolean;
|
142
|
+
private shouldInterrupt;
|
143
|
+
private updateLastTrace;
|
114
144
|
}
|
145
|
+
export declare function highestOneBit(i: number): number;
|
@@ -6,9 +6,9 @@ import { Exit } from "@fncts/base/data/Exit/definition";
|
|
6
6
|
* @tsplus fluent fncts.io.Fiber interruptAsFork
|
7
7
|
* @tsplus location "@fncts/io/Fiber/api/interruptAs"
|
8
8
|
*/
|
9
|
-
export declare function interruptAsFork<E, A>(self: Fiber<E, A>, fiberId: FiberId): UIO<void>;
|
9
|
+
export declare function interruptAsFork<E, A>(self: Fiber<E, A>, fiberId: FiberId, __tsplusTrace?: string): UIO<void>;
|
10
10
|
/**
|
11
11
|
* @tsplus fluent fncts.io.Fiber interruptAs
|
12
12
|
* @tsplus location "@fncts/io/Fiber/api/interruptAs"
|
13
13
|
*/
|
14
|
-
export declare function interruptAs<E, A>(self: Fiber<E, A>, fiberId: FiberId): UIO<Exit<E, A>>;
|
14
|
+
export declare function interruptAs<E, A>(self: Fiber<E, A>, fiberId: FiberId, __tsplusTrace?: string): UIO<Exit<E, A>>;
|
package/Fiber/definition.d.ts
CHANGED
@@ -49,6 +49,7 @@ export interface FiberCommon<E, A> extends Fiber<E, A> {
|
|
49
49
|
* Otherwise, the effect will resume when the fiber exits.
|
50
50
|
*/
|
51
51
|
readonly interruptAsFork: (fiberId: FiberId) => UIO<void>;
|
52
|
+
readonly interruptAs: (fiberId: FiberId) => UIO<Exit<E, A>>;
|
52
53
|
/**
|
53
54
|
* Tentatively observes the fiber, but returns immediately if it is not already done.
|
54
55
|
*/
|
@@ -92,6 +93,7 @@ export declare class SyntheticFiber<E, A> implements FiberCommon<E, A> {
|
|
92
93
|
};
|
93
94
|
readonly await: UIO<import("@fncts/base/data/Exit").Exit<E, A>>;
|
94
95
|
constructor(id: FiberId, wait: UIO<Exit<E, A>>, children: UIO<Conc<Fiber.Runtime<any, any>>>, inheritAll: UIO<void>, poll: UIO<Maybe<Exit<E, A>>>, interruptAsFork: (fiberId: FiberId) => UIO<void>);
|
96
|
+
interruptAs: (fiberId: FiberId) => UIO<Exit<E, A>>;
|
95
97
|
}
|
96
98
|
export type ConcreteFiber<E, A> = Fiber.Runtime<E, A> | Fiber.Synthetic<E, A>;
|
97
99
|
/**
|
@@ -14,14 +14,17 @@ import type { RuntimeFlags } from "@fncts/io/RuntimeFlags";
|
|
14
14
|
export declare abstract class FiberScope {
|
15
15
|
abstract fiberId: FiberId;
|
16
16
|
abstract unsafeAdd(currentFiber: FiberRuntime<any, any>, runtimeFlags: RuntimeFlags, child: FiberRuntime<any, any>): void;
|
17
|
+
abstract unsafeAddAll(currentFiber: FiberRuntime<any, any>, runtimeFlags: RuntimeFlags, children: Iterable<FiberRuntime<any, any>>): void;
|
17
18
|
}
|
18
19
|
export declare class Global extends FiberScope {
|
19
20
|
get fiberId(): FiberId;
|
20
21
|
unsafeAdd(_currentFiber: FiberRuntime<any, any>, runtimeFlags: RuntimeFlags, child: FiberRuntime<any, any>): void;
|
22
|
+
unsafeAddAll(_currentFiber: FiberRuntime<any, any>, runtimeFlags: RuntimeFlags, children: Iterable<FiberRuntime<any, any>>): void;
|
21
23
|
}
|
22
24
|
export declare class Local extends FiberScope {
|
23
25
|
readonly fiberId: FiberId;
|
24
26
|
private parentRef;
|
25
27
|
constructor(fiberId: FiberId, parentRef: WeakRef<FiberRuntime<unknown, unknown>>);
|
26
28
|
unsafeAdd(currentFiber: FiberRuntime<any, any>, _runtimeFlags: RuntimeFlags, child: FiberRuntime<any, any>): void;
|
29
|
+
unsafeAddAll(currentFiber: FiberRuntime<any, any>, _runtimeFlags: RuntimeFlags, children: Iterable<FiberRuntime<any, any>>): void;
|
27
30
|
}
|
package/FiberSet.d.ts
CHANGED
@@ -8,11 +8,12 @@ export type FiberSetTypeId = typeof FiberSetTypeId;
|
|
8
8
|
* @tsplus type fncts.io.FiberSet
|
9
9
|
* @tsplus companion fncts.io.FiberSetOps
|
10
10
|
*/
|
11
|
-
export declare class FiberSet<E, A> {
|
11
|
+
export declare class FiberSet<E, A> implements Iterable<Fiber<E, A>> {
|
12
12
|
readonly backing: Set<Fiber.Runtime<E, A>>;
|
13
13
|
readonly future: Future<unknown, never>;
|
14
14
|
readonly [FiberSetTypeId]: FiberSetTypeId;
|
15
15
|
constructor(backing: Set<Fiber.Runtime<E, A>>, future: Future<unknown, never>);
|
16
|
+
[Symbol.iterator](): Iterator<Fiber<E, A>>;
|
16
17
|
}
|
17
18
|
/**
|
18
19
|
* @tsplus static fncts.io.FiberSetOps unsafeMake
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { FIO } from "@fncts/io/IO/definition";
|
2
|
+
export type FutureState<E, A> = Done<E, A> | Pending<E, A>;
|
3
|
+
export declare const enum FutureStateTag {
|
4
|
+
Link = 0,
|
5
|
+
Empty = 1,
|
6
|
+
Done = 2
|
7
|
+
}
|
8
|
+
export declare abstract class Pending<E, A> {
|
9
|
+
abstract size: number;
|
10
|
+
abstract complete(io: FIO<E, A>): void;
|
11
|
+
abstract add(waiter: (io: FIO<E, A>) => any): Pending<E, A>;
|
12
|
+
abstract remove(waiter: (io: FIO<E, A>) => any): Pending<E, A>;
|
13
|
+
}
|
14
|
+
export type Concrete<E, A> = Empty | Link<E, A> | Done<E, A>;
|
15
|
+
export type ConcretePending<E, A> = Empty | Link<E, A>;
|
16
|
+
/**
|
17
|
+
* @tsplus fluent fncts.io.Future.State concrete
|
18
|
+
* @tsplus macro remove
|
19
|
+
* @tsplus location "@fncts/io/Future/State"
|
20
|
+
*/
|
21
|
+
export declare function concrete<E, A>(self: State<E, A>): asserts self is Concrete<E, A>;
|
22
|
+
/**
|
23
|
+
* @tsplus fluent fncts.io.Future.State concretePending
|
24
|
+
* @tsplus macro remove
|
25
|
+
* @tsplus location "@fncts/io/Future/State"
|
26
|
+
*/
|
27
|
+
export declare function concretePending<E, A>(self: Pending<E, A>): asserts self is ConcretePending<E, A>;
|
28
|
+
export declare class Empty extends Pending<never, never> {
|
29
|
+
readonly _tag = FutureStateTag.Empty;
|
30
|
+
size: number;
|
31
|
+
complete(_: FIO<never, never>): void;
|
32
|
+
add(waiter: (io: FIO<never, never>) => any): Pending<never, never>;
|
33
|
+
remove(_: (io: FIO<never, never>) => any): Pending<never, never>;
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* @tsplus static fncts.io.Future.State Empty
|
37
|
+
* @tsplus location "@fncts/io/Future/State"
|
38
|
+
*/
|
39
|
+
export declare const _Empty: Empty;
|
40
|
+
export declare class Link<E, A> extends Pending<E, A> {
|
41
|
+
readonly waiter: (io: FIO<E, A>) => any;
|
42
|
+
readonly ws: Pending<E, A>;
|
43
|
+
readonly size: number;
|
44
|
+
readonly _tag = FutureStateTag.Link;
|
45
|
+
constructor(waiter: (io: FIO<E, A>) => any, ws: Pending<E, A>, size: number);
|
46
|
+
add(waiter: (io: FIO<E, A>) => any): Pending<E, A>;
|
47
|
+
complete(io: FIO<E, A>): void;
|
48
|
+
remove(waiter: (io: FIO<E, A>) => any): Pending<E, A>;
|
49
|
+
}
|
50
|
+
export declare class Done<E, A> {
|
51
|
+
readonly value: FIO<E, A>;
|
52
|
+
readonly _tag = FutureStateTag.Done;
|
53
|
+
constructor(value: FIO<E, A>);
|
54
|
+
}
|
55
|
+
/**
|
56
|
+
* @tsplus type fncts.io.Future.State
|
57
|
+
* @tsplus companion fncts.io.Future.State
|
58
|
+
*/
|
59
|
+
export type State<E, A> = Done<E, A> | Pending<E, A>;
|
package/Future/api.d.ts
CHANGED
@@ -29,7 +29,7 @@ export declare function failCause<E>(cause: Cause<E>, __tsplusTrace?: string): <
|
|
29
29
|
* Completes the future with the result of the specified effect. If the
|
30
30
|
* future has already been completed, the method will produce false.
|
31
31
|
*
|
32
|
-
* Note that `Future.
|
32
|
+
* Note that `Future.fulfillWith` will be much faster, so consider using
|
33
33
|
* that if you do not need to memoize the result of the specified effect.
|
34
34
|
* @tsplus pipeable fncts.io.Future fulfill
|
35
35
|
* @tsplus location "@fncts/io/Future/api"
|
@@ -46,7 +46,7 @@ export declare function fulfill<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string
|
|
46
46
|
* case te meaning of the "exactly once" guarantee of `Future` is that the
|
47
47
|
* future can be completed with exactly one effect. For a version that
|
48
48
|
* completes the future with the result of an IO see
|
49
|
-
* `Future.
|
49
|
+
* `Future.fulfill`.
|
50
50
|
* @tsplus pipeable fncts.io.Future fulfillWith
|
51
51
|
* @tsplus location "@fncts/io/Future/api"
|
52
52
|
*/
|
@@ -105,11 +105,16 @@ export declare function succeedVoid_(a: void, __tsplusTrace?: string): <E>(futur
|
|
105
105
|
* @tsplus location "@fncts/io/Future/api"
|
106
106
|
*/
|
107
107
|
export declare function unsafeDone<E, A>(io: FIO<E, A>, __tsplusTrace?: string): (future: Future<E, A>) => void;
|
108
|
+
/**
|
109
|
+
* @tsplus pipeable fncts.io.Future unsafeFulfill
|
110
|
+
* @tsplus location "@fncts/io/Future/api"
|
111
|
+
*/
|
112
|
+
export declare function unsafeFulfill<E, A>(io: FIO<E, A>): (future: Future<E, A>) => boolean;
|
108
113
|
/**
|
109
114
|
* @tsplus pipeable fncts.io.Future unsafeSucceed
|
110
115
|
* @tsplus location "@fncts/io/Future/api"
|
111
116
|
*/
|
112
|
-
export declare function unsafeSucceed<A>(a: A, __tsplusTrace?: string): (future: Future<never, A>) =>
|
117
|
+
export declare function unsafeSucceed<A>(a: A, __tsplusTrace?: string): (future: Future<never, A>) => boolean;
|
113
118
|
/**
|
114
119
|
* Retrieves the value of the future, suspending the fiber running the action
|
115
120
|
* until the result is available.
|
package/Future/constructors.d.ts
CHANGED
@@ -12,7 +12,7 @@ export declare function make<E, A>(__tsplusTrace?: string): IO<never, never, Fut
|
|
12
12
|
* @tsplus static fncts.io.FutureOps makeAs
|
13
13
|
* @tsplus location "@fncts/io/Future/constructors"
|
14
14
|
*/
|
15
|
-
export declare function makeAs<E, A>(fiberId: FiberId, __tsplusTrace?: string): import("../IO").UIO<Future<E, A>>;
|
15
|
+
export declare function makeAs<E, A>(fiberId: FiberId, __tsplusTrace?: string): import("../IO.js").UIO<Future<E, A>>;
|
16
16
|
/**
|
17
17
|
* Makes a new future to be completed by the fiber with the specified id.
|
18
18
|
* @tsplus static fncts.io.FutureOps unsafeMake
|
package/Future/definition.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
2
|
-
import {
|
3
|
-
import { FIO } from "@fncts/io/IO/definition";
|
2
|
+
import type { State } from "./State.js";
|
4
3
|
export declare const FutureTypeId: unique symbol;
|
5
4
|
export type FutureTypeId = typeof FutureTypeId;
|
6
5
|
export declare const FutureVariance: unique symbol;
|
@@ -31,18 +30,3 @@ export declare namespace Future {
|
|
31
30
|
};
|
32
31
|
}] ? A : never;
|
33
32
|
}
|
34
|
-
export declare const enum FutureStateTag {
|
35
|
-
Done = 0,
|
36
|
-
Pending = 1
|
37
|
-
}
|
38
|
-
export declare class Pending<E, A> {
|
39
|
-
readonly joiners: List<(_: FIO<E, A>) => void>;
|
40
|
-
readonly _tag = FutureStateTag.Pending;
|
41
|
-
constructor(joiners: List<(_: FIO<E, A>) => void>);
|
42
|
-
}
|
43
|
-
export declare class Done<E, A> {
|
44
|
-
readonly value: FIO<E, A>;
|
45
|
-
readonly _tag = FutureStateTag.Done;
|
46
|
-
constructor(value: FIO<E, A>);
|
47
|
-
}
|
48
|
-
export type State<E, A> = Done<E, A> | Pending<E, A>;
|
package/Future.d.ts
CHANGED
package/Hub/api.d.ts
CHANGED
@@ -37,6 +37,12 @@ export declare function dimap<A, B, C, D>(f: (c: C) => A, g: (b: B) => D, __tspl
|
|
37
37
|
* @tsplus location "@fncts/io/Hub/api"
|
38
38
|
*/
|
39
39
|
export declare function dimapIO<A, B, RC, EC, C, RD, ED, D>(f: (c: C) => IO<RC, EC, A>, g: (b: B) => IO<RD, ED, D>, __tsplusTrace?: string): <RA, RB, EA, EB>(source: PHub<RA, RB, EA, EB, A, B>) => PHub<RC | RA, RD | RB, EA | EC, EB | ED, C, D>;
|
40
|
+
/**
|
41
|
+
* Filters messages published to the hub using the specified function.
|
42
|
+
* @tsplus pipeable fncts.io.Hub filterInput
|
43
|
+
* @tsplus location "@fncts/io/Hub/api"
|
44
|
+
*/
|
45
|
+
export declare function filterInput<A>(f: (a: A) => boolean, __tsplusTrace?: string): <RA, RB, EA, EB, B>(self: PHub<RA, RB, EA, EB, A, B>) => import("@fncts/io/Hub/definition").PHub<RA, RB, EA, EB, A, B>;
|
40
46
|
/**
|
41
47
|
* Filters messages published to the hub using the specified effectual
|
42
48
|
* function.
|
@@ -45,11 +51,11 @@ export declare function dimapIO<A, B, RC, EC, C, RD, ED, D>(f: (c: C) => IO<RC,
|
|
45
51
|
*/
|
46
52
|
export declare function filterInputIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <RA, RB, EA, EB, B>(source: PHub<RA, RB, EA, EB, A, B>) => PHub<RA | R1, RB, EA | E1, EB, A, B>;
|
47
53
|
/**
|
48
|
-
* Filters messages
|
49
|
-
* @tsplus pipeable fncts.io.Hub
|
54
|
+
* Filters messages taken from the hub using the specified function.
|
55
|
+
* @tsplus pipeable fncts.io.Hub filterOutput
|
50
56
|
* @tsplus location "@fncts/io/Hub/api"
|
51
57
|
*/
|
52
|
-
export declare function
|
58
|
+
export declare function filterOutput<B>(f: (b: B) => boolean, __tsplusTrace?: string): <RA, RB, EA, EB, A>(self: PHub<RA, RB, EA, EB, A, B>) => PHub<RA, RB, EA, EB, A, B>;
|
53
59
|
/**
|
54
60
|
* Filters messages taken from the hub using the specified effectual
|
55
61
|
* function.
|
@@ -57,12 +63,6 @@ export declare function filterInput<A>(f: (a: A) => boolean, __tsplusTrace?: str
|
|
57
63
|
* @tsplus location "@fncts/io/Hub/api"
|
58
64
|
*/
|
59
65
|
export declare function filterOutputIO<B, R1, E1>(f: (a: B) => IO<R1, E1, boolean>, __tsplusTrace?: string): <RA, RB, EA, EB, A>(source: PHub<RA, RB, EA, EB, A, B>) => PHub<RA, RB | R1, EA, EB | E1, A, B>;
|
60
|
-
/**
|
61
|
-
* Filters messages taken from the hub using the specified function.
|
62
|
-
* @tsplus pipeable fncts.io.Hub filterOutput
|
63
|
-
* @tsplus location "@fncts/io/Hub/api"
|
64
|
-
*/
|
65
|
-
export declare function filterOutput<B>(f: (b: B) => boolean, __tsplusTrace?: string): <RA, RB, EA, EB, A>(self: PHub<RA, RB, EA, EB, A, B>) => PHub<RA, RB, EA, EB, A, B>;
|
66
66
|
/**
|
67
67
|
* Checks whether the hub is shut down.
|
68
68
|
* @tsplus getter fncts.io.Hub isShutdown
|
@@ -136,6 +136,12 @@ export declare function publishAll<A>(as: Iterable<A>, __tsplusTrace?: string):
|
|
136
136
|
* @tsplus location "@fncts/io/Hub/api"
|
137
137
|
*/
|
138
138
|
export declare function shutdown<RA, RB, EA, EB, A, B>(self: PHub<RA, RB, EA, EB, A, B>, __tsplusTrace?: string): UIO<void>;
|
139
|
+
/**
|
140
|
+
* The current number of messages in the hub.
|
141
|
+
* @tsplus getter fncts.io.Hub size
|
142
|
+
* @tsplus location "@fncts/io/Hub/api"
|
143
|
+
*/
|
144
|
+
export declare function size<RA, RB, EA, EB, A, B>(self: PHub<RA, RB, EA, EB, A, B>, __tsplusTrace?: string): UIO<number>;
|
139
145
|
/**
|
140
146
|
* Subscribes to receive messages from the hub. The resulting subscription
|
141
147
|
* can be evaluated multiple times within the scope of the managed to take a
|
@@ -144,12 +150,6 @@ export declare function shutdown<RA, RB, EA, EB, A, B>(self: PHub<RA, RB, EA, EB
|
|
144
150
|
* @tsplus location "@fncts/io/Hub/api"
|
145
151
|
*/
|
146
152
|
export declare function subscribe<RA, RB, EA, EB, A, B>(self: PHub<RA, RB, EA, EB, A, B>, __tsplusTrace?: string): IO<Scope, never, PDequeue<RA, RB, EA, EB, A, B>>;
|
147
|
-
/**
|
148
|
-
* The current number of messages in the hub.
|
149
|
-
* @tsplus getter fncts.io.Hub size
|
150
|
-
* @tsplus location "@fncts/io/Hub/api"
|
151
|
-
*/
|
152
|
-
export declare function size<RA, RB, EA, EB, A, B>(self: PHub<RA, RB, EA, EB, A, B>, __tsplusTrace?: string): UIO<number>;
|
153
153
|
/**
|
154
154
|
* Views the hub as a queue that can only be written to.
|
155
155
|
* @tsplus getter fncts.io.Hub toQueue
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { IO } from "@fncts/io/IO/definition";
|
2
|
+
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
3
|
+
/**
|
4
|
+
* @tsplus fluent fncts.ReadonlyArray mapIOWithIndexDiscard
|
5
|
+
* @tsplus location "@fncts/io/IO/api/array"
|
6
|
+
*/
|
7
|
+
export declare function foreachArrayWithIndexDiscard<A, R, E>(array: ReadonlyArray<A>, f: (i: number, a: A) => IO<R, E, unknown>): IO<R, E, void>;
|
8
|
+
/**
|
9
|
+
* @tsplus fluent fncts.ReadonlyArray mapIODiscard
|
10
|
+
* @tsplus location "@fncts/io/IO/api/array"
|
11
|
+
*/
|
12
|
+
export declare function foreachArrayDiscard<A, R, E>(array: ReadonlyArray<A>, f: (a: A) => IO<R, E, unknown>): IO<R, E, void>;
|
13
|
+
/**
|
14
|
+
* @tsplus fluent fncts.ReadonlyArray mapIOWithIndex
|
15
|
+
* @tsplus location "@fncts/io/IO/api/array"
|
16
|
+
*/
|
17
|
+
export declare function foreachArrayWithIndex<A, R, E, B>(array: ReadonlyArray<A>, f: (i: number, a: A) => IO<R, E, B>): IO<R, E, Conc<B>>;
|
18
|
+
/**
|
19
|
+
* @tsplus fluent fncts.ReadonlyArray mapIO
|
20
|
+
* @tsplus location "@fncts/io/IO/api/array"
|
21
|
+
*/
|
22
|
+
export declare function foreachArray<A, R, E, B>(array: ReadonlyArray<A>, f: (a: A) => IO<R, E, B>): IO<R, E, Conc<B>>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
2
|
+
import { Duration } from "@fncts/base/data/Duration/definition";
|
3
|
+
import { IO, FIO, UIO } from "@fncts/io/IO/definition";
|
4
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
5
|
+
import { Future } from "@fncts/io/Future";
|
6
|
+
/**
|
7
|
+
* @tsplus pipeable fncts.io.IO cached
|
8
|
+
* @tsplus location "@fncts/io/IO/api/cachedInvalidate"
|
9
|
+
*/
|
10
|
+
export declare function cached(timeToLive: Lazy<Duration>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, never, FIO<E, A>>;
|
11
|
+
/**
|
12
|
+
* @tsplus pipeable fncts.io.IO cachedInvalidate
|
13
|
+
* @tsplus location "@fncts/io/IO/api/cachedInvalidate"
|
14
|
+
*/
|
15
|
+
export declare function cachedInvalidate(timeToLive: Lazy<Duration>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, never, readonly [FIO<E, A>, UIO<void>]>;
|
package/IO/api/forkDaemon.d.ts
CHANGED
@@ -7,4 +7,4 @@ import type { FiberRuntime } from "@fncts/io/Fiber/FiberRuntime";
|
|
7
7
|
* @tsplus getter fncts.io.IO forkDaemon
|
8
8
|
* @tsplus location "@fncts/io/IO/api/forkDaemon"
|
9
9
|
*/
|
10
|
-
export declare function forkDaemon<R, E, A>(
|
10
|
+
export declare function forkDaemon<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): URIO<R, FiberRuntime<E, A>>;
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
2
2
|
import { URIO, IO } from "@fncts/io/IO/definition";
|
3
|
-
import { Lazy } from "@fncts/base/data/function/definition";
|
4
3
|
/**
|
5
4
|
* @tsplus pipeable fncts.io.IO onTermination
|
6
5
|
* @tsplus location "@fncts/io/IO/api/onTermination"
|
7
6
|
*/
|
8
|
-
export declare function onTermination<R1>(cleanup: (cause: Cause<never>) => URIO<R1, any>, __tsplusTrace?: string): <R, E, A>(self:
|
7
|
+
export declare function onTermination<R1>(cleanup: (cause: Cause<never>) => URIO<R1, any>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R | R1, E, A>;
|
package/IO/api/transplant.d.ts
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
2
|
-
|
2
|
+
import { FiberScope } from "@fncts/io/FiberScope";
|
3
|
+
import { FiberRef } from "@fncts/io/FiberRef/definition";
|
4
|
+
import { Just } from "@fncts/base/data/Maybe/definition";
|
5
|
+
import { Exit } from "@fncts/base/data/Exit/definition";
|
3
6
|
/**
|
4
7
|
* Transplants specified effects so that when those effects fork other
|
5
8
|
* effects, the forked effects will be governed by the scope of the
|
@@ -11,3 +14,10 @@ export type Grafter = <R, E, A>(effect: IO<R, E, A>) => IO<R, E, A>;
|
|
11
14
|
* @tsplus location "@fncts/io/IO/api/transplant"
|
12
15
|
*/
|
13
16
|
export declare function transplant<R, E, A>(f: (_: Grafter) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
17
|
+
export declare class Grafter {
|
18
|
+
private readonly scope;
|
19
|
+
constructor(scope: FiberScope);
|
20
|
+
graft: <R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string) => IO<R, E, A>;
|
21
|
+
graftOnExit: <R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string) => IO<R, E, A>;
|
22
|
+
graftOnExitWith: <R, E, A>(io: IO<R, E, A>, ensuring: (exit: Exit<E, A>) => void, __tsplusTrace?: string) => IO<R, E, A>;
|
23
|
+
}
|