@fncts/io 0.0.49 → 0.0.51
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/Channel/internal/SingleProducerAsyncInput.d.ts +1 -1
- package/CountdownLatch.d.ts +5 -5
- package/Fiber/FiberRuntime.d.ts +1 -1
- package/Hub/api.d.ts +7 -7
- package/IO/api/foreachExec.d.ts +18 -0
- package/IO/api.d.ts +1 -1
- package/Push/Bounds.d.ts +4 -0
- package/Push/FlattenStrategy.d.ts +47 -0
- package/Push/IndexedBuffer.d.ts +19 -0
- package/Push/MergeStrategy.d.ts +19 -0
- package/Push/Operator/IOLoopOperator.d.ts +61 -0
- package/Push/Operator/IOOperator.d.ts +63 -0
- package/Push/Operator/LoopOperator.d.ts +50 -0
- package/Push/Operator/SyncOperator.d.ts +41 -0
- package/Push/Operator.d.ts +4 -0
- package/Push/Producer/IOProducer.d.ts +41 -0
- package/Push/Producer/SyncProducer.d.ts +61 -0
- package/Push/Producer.d.ts +1 -0
- package/Push/Sink.d.ts +65 -0
- package/Push/api.d.ts +80 -163
- package/Push/definition.d.ts +92 -19
- package/Push/internal.d.ts +3 -0
- package/Push.d.ts +6 -0
- package/Queue/api/dimapIO.d.ts +12 -12
- package/Ref/Synchronized/definition.d.ts +32 -9
- package/Ref/definition.d.ts +12 -0
- package/STM/api.d.ts +1 -1
- package/Scope/api.d.ts +16 -1
- package/Semaphore/definition.d.ts +1 -1
- package/Sink/definition.d.ts +5 -6
- package/Subject/Atomic.d.ts +19 -9
- package/Subject/DeferredRef.d.ts +17 -0
- package/Subject/Hold.d.ts +19 -0
- package/Subject/RefSubject/Atomic.d.ts +43 -0
- package/Subject/RefSubject/Derived.d.ts +43 -0
- package/Subject/RefSubject/RefSubject.d.ts +37 -0
- package/Subject/RefSubject/constructors.d.ts +15 -0
- package/Subject/RefSubject.d.ts +4 -0
- package/Subject/definition.d.ts +14 -2
- package/Subject.d.ts +3 -0
- package/SubscriptionRef.d.ts +0 -1
- package/Supervisor/definition.d.ts +1 -1
- package/_cjs/Cached/api.cjs +8 -2
- package/_cjs/Cached/api.cjs.map +1 -1
- package/_cjs/Cached/definition.cjs +2 -6
- package/_cjs/Cached/definition.cjs.map +1 -1
- package/_cjs/CancellerState.cjs +4 -7
- package/_cjs/CancellerState.cjs.map +1 -1
- package/_cjs/Channel/UpstreamPullRequest/definition.cjs +4 -2
- package/_cjs/Channel/UpstreamPullRequest/definition.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +2 -3
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/definition.cjs +22 -16
- package/_cjs/Channel/definition.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +35 -11
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelState.cjs +15 -8
- package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
- package/_cjs/Channel/internal/MergeDecision.cjs +6 -8
- package/_cjs/Channel/internal/MergeDecision.cjs.map +1 -1
- package/_cjs/Channel/internal/MergeState.cjs +7 -3
- package/_cjs/Channel/internal/MergeState.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +49 -42
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Clock/live.cjs +1 -4
- package/_cjs/Clock/live.cjs.map +1 -1
- package/_cjs/CountdownLatch.cjs +22 -12
- package/_cjs/CountdownLatch.cjs.map +1 -1
- package/_cjs/Differ/api.cjs +3 -12
- package/_cjs/Differ/api.cjs.map +1 -1
- package/_cjs/Differ/definition.cjs +1 -5
- package/_cjs/Differ/definition.cjs.map +1 -1
- package/_cjs/Fiber/FiberMessage.cjs +6 -3
- package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +66 -61
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/definition.cjs +10 -6
- package/_cjs/Fiber/definition.cjs.map +1 -1
- package/_cjs/FiberDescriptor.cjs +3 -0
- package/_cjs/FiberDescriptor.cjs.map +1 -1
- package/_cjs/FiberRef/definition.cjs +9 -6
- package/_cjs/FiberRef/definition.cjs.map +1 -1
- package/_cjs/FiberRefs/Patch.cjs +13 -13
- package/_cjs/FiberRefs/Patch.cjs.map +1 -1
- package/_cjs/FiberScope/definition.cjs +2 -0
- package/_cjs/FiberScope/definition.cjs.map +1 -1
- package/_cjs/FiberSet.cjs +4 -3
- package/_cjs/FiberSet.cjs.map +1 -1
- package/_cjs/FiberStatus/definition.cjs +12 -9
- package/_cjs/FiberStatus/definition.cjs.map +1 -1
- package/_cjs/Future/State.cjs +8 -7
- package/_cjs/Future/State.cjs.map +1 -1
- package/_cjs/Future/definition.cjs +3 -3
- package/_cjs/Future/definition.cjs.map +1 -1
- package/_cjs/Hub/api.cjs +61 -44
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/definition.cjs +4 -8
- package/_cjs/Hub/definition.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +130 -110
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/foreachExec.cjs +29 -4
- package/_cjs/IO/api/foreachExec.cjs.map +1 -1
- package/_cjs/IO/api/transplant.cjs +8 -7
- package/_cjs/IO/api/transplant.cjs.map +1 -1
- package/_cjs/IO/api.cjs +9 -4
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +8 -12
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +64 -61
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/InterruptStatus/definition.cjs +1 -0
- package/_cjs/InterruptStatus/definition.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +25 -24
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/definition.cjs +30 -13
- package/_cjs/Layer/definition.cjs.map +1 -1
- package/_cjs/LogLevel.cjs +3 -0
- package/_cjs/LogLevel.cjs.map +1 -1
- package/_cjs/LogSpan.cjs +2 -0
- package/_cjs/LogSpan.cjs.map +1 -1
- package/_cjs/Logger/definition.cjs +1 -0
- package/_cjs/Logger/definition.cjs.map +1 -1
- package/_cjs/MVar/definition.cjs +3 -4
- package/_cjs/MVar/definition.cjs.map +1 -1
- package/_cjs/Push/Bounds.cjs +2 -0
- package/_cjs/Push/Bounds.cjs.map +1 -0
- package/_cjs/Push/FlattenStrategy.cjs +96 -0
- package/_cjs/Push/FlattenStrategy.cjs.map +1 -0
- package/_cjs/Push/IndexedBuffer.cjs +74 -0
- package/_cjs/Push/IndexedBuffer.cjs.map +1 -0
- package/_cjs/Push/MergeStrategy.cjs +47 -0
- package/_cjs/Push/MergeStrategy.cjs.map +1 -0
- package/_cjs/Push/Operator/IOLoopOperator.cjs +225 -0
- package/_cjs/Push/Operator/IOLoopOperator.cjs.map +1 -0
- package/_cjs/Push/Operator/IOOperator.cjs +104 -0
- package/_cjs/Push/Operator/IOOperator.cjs.map +1 -0
- package/_cjs/Push/Operator/LoopOperator.cjs +165 -0
- package/_cjs/Push/Operator/LoopOperator.cjs.map +1 -0
- package/_cjs/Push/Operator/SyncOperator.cjs +78 -0
- package/_cjs/Push/Operator/SyncOperator.cjs.map +1 -0
- package/_cjs/Push/Operator.cjs +2 -0
- package/_cjs/Push/Operator.cjs.map +1 -0
- package/_cjs/Push/Producer/IOProducer.cjs +72 -0
- package/_cjs/Push/Producer/IOProducer.cjs.map +1 -0
- package/_cjs/Push/Producer/SyncProducer.cjs +111 -0
- package/_cjs/Push/Producer/SyncProducer.cjs.map +1 -0
- package/_cjs/Push/Producer.cjs +2 -0
- package/_cjs/Push/Producer.cjs.map +1 -0
- package/_cjs/Push/Sink.cjs +238 -0
- package/_cjs/Push/Sink.cjs.map +1 -0
- package/_cjs/Push/api.cjs +369 -387
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Push/definition.cjs +82 -26
- package/_cjs/Push/definition.cjs.map +1 -1
- package/_cjs/Push/internal.cjs +31 -26
- package/_cjs/Push/internal.cjs.map +1 -1
- package/_cjs/Push.cjs +66 -0
- package/_cjs/Push.cjs.map +1 -1
- package/_cjs/Queue/api/dimapIO.cjs +74 -32
- package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +51 -25
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +60 -30
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Queue/api/zipWithIO.cjs +27 -10
- package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
- package/_cjs/Queue/definition.cjs +3 -7
- package/_cjs/Queue/definition.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +73 -62
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Queue/strategy.cjs +1 -3
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Random/live.cjs +4 -3
- package/_cjs/Random/live.cjs.map +1 -1
- package/_cjs/Ref/Atomic.cjs +2 -3
- package/_cjs/Ref/Atomic.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs +2 -3
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs +2 -3
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/definition.cjs +17 -16
- package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
- package/_cjs/Ref/definition.cjs +2 -6
- package/_cjs/Ref/definition.cjs.map +1 -1
- package/_cjs/Reloadable/definition.cjs +2 -0
- package/_cjs/Reloadable/definition.cjs.map +1 -1
- package/_cjs/STM/definition.cjs +30 -25
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +5 -0
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/Entry.cjs +9 -6
- package/_cjs/STM/internal/Entry.cjs.map +1 -1
- package/_cjs/STM/internal/TryCommit.cjs +6 -7
- package/_cjs/STM/internal/TryCommit.cjs.map +1 -1
- package/_cjs/STM/internal/Versioned.cjs +2 -3
- package/_cjs/STM/internal/Versioned.cjs.map +1 -1
- package/_cjs/Schedule/Decision.cjs +3 -4
- package/_cjs/Schedule/Decision.cjs.map +1 -1
- package/_cjs/Schedule/Driver.cjs +4 -0
- package/_cjs/Schedule/Driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +2 -5
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Schedule/definition.cjs +3 -1
- package/_cjs/Schedule/definition.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/definition.cjs +8 -2
- package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
- package/_cjs/Scope/api.cjs +29 -11
- package/_cjs/Scope/api.cjs.map +1 -1
- package/_cjs/Scope/definition.cjs +3 -7
- package/_cjs/Scope/definition.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +8 -3
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/ScopedRef/definition.cjs +1 -5
- package/_cjs/ScopedRef/definition.cjs.map +1 -1
- package/_cjs/Semaphore/Reservation.cjs +2 -0
- package/_cjs/Semaphore/Reservation.cjs.map +1 -1
- package/_cjs/Semaphore/definition.cjs +42 -38
- package/_cjs/Semaphore/definition.cjs.map +1 -1
- package/_cjs/Sink/definition.cjs +3 -3
- package/_cjs/Sink/definition.cjs.map +1 -1
- package/_cjs/State/api.cjs +1 -4
- package/_cjs/State/api.cjs.map +1 -1
- package/_cjs/State/definition.cjs +2 -6
- package/_cjs/State/definition.cjs.map +1 -1
- package/_cjs/State/internal.cjs +1 -5
- package/_cjs/State/internal.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +7 -11
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +5 -5
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +8 -7
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Stream/definition.cjs +3 -4
- package/_cjs/Stream/definition.cjs.map +1 -1
- package/_cjs/Stream/internal/DebounceState.cjs +5 -5
- package/_cjs/Stream/internal/DebounceState.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +18 -17
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/SinkEndReason.cjs +5 -12
- package/_cjs/Stream/internal/SinkEndReason.cjs.map +1 -1
- package/_cjs/Stream/internal/Take.cjs +3 -0
- package/_cjs/Stream/internal/Take.cjs.map +1 -1
- package/_cjs/Subject/Atomic.cjs +45 -15
- package/_cjs/Subject/Atomic.cjs.map +1 -1
- package/_cjs/Subject/DeferredRef.cjs +56 -0
- package/_cjs/Subject/DeferredRef.cjs.map +1 -0
- package/_cjs/Subject/Hold.cjs +38 -0
- package/_cjs/Subject/Hold.cjs.map +1 -0
- package/_cjs/Subject/RefSubject/Atomic.cjs +171 -0
- package/_cjs/Subject/RefSubject/Atomic.cjs.map +1 -0
- package/_cjs/Subject/RefSubject/Derived.cjs +103 -0
- package/_cjs/Subject/RefSubject/Derived.cjs.map +1 -0
- package/_cjs/Subject/RefSubject/RefSubject.cjs +18 -0
- package/_cjs/Subject/RefSubject/RefSubject.cjs.map +1 -0
- package/_cjs/Subject/RefSubject/constructors.cjs +30 -0
- package/_cjs/Subject/RefSubject/constructors.cjs.map +1 -0
- package/_cjs/Subject/RefSubject.cjs +2 -0
- package/_cjs/Subject/RefSubject.cjs.map +1 -0
- package/_cjs/Subject/definition.cjs +11 -1
- package/_cjs/Subject/definition.cjs.map +1 -1
- package/_cjs/Subject.cjs +33 -0
- package/_cjs/Subject.cjs.map +1 -1
- package/_cjs/SubscriptionRef.cjs +4 -5
- package/_cjs/SubscriptionRef.cjs.map +1 -1
- package/_cjs/Supervisor/constructors.cjs +3 -11
- package/_cjs/Supervisor/constructors.cjs.map +1 -1
- package/_cjs/Supervisor/definition.cjs +10 -4
- package/_cjs/Supervisor/definition.cjs.map +1 -1
- package/_cjs/SupervisorPatch.cjs +9 -12
- package/_cjs/SupervisorPatch.cjs.map +1 -1
- package/_cjs/TExit/definition.cjs +19 -18
- package/_cjs/TExit/definition.cjs.map +1 -1
- package/_cjs/TReentrantLock/definition.cjs +8 -3
- package/_cjs/TReentrantLock/definition.cjs.map +1 -1
- package/_cjs/TRef/definition.cjs +6 -6
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/internal/BackgroundScheduler.cjs +16 -16
- package/_cjs/internal/BackgroundScheduler.cjs.map +1 -1
- package/_cjs/internal/HashedPair.cjs +2 -0
- package/_cjs/internal/HashedPair.cjs.map +1 -1
- package/_cjs/internal/Hub.cjs +39 -15
- package/_cjs/internal/Hub.cjs.map +1 -1
- package/_cjs/internal/IsFatal.cjs +7 -11
- package/_cjs/internal/IsFatal.cjs.map +1 -1
- package/_cjs/internal/MutableQueue.cjs +14 -11
- package/_cjs/internal/MutableQueue.cjs.map +1 -1
- package/_cjs/internal/Scheduler.cjs +4 -8
- package/_cjs/internal/Scheduler.cjs.map +1 -1
- package/_cjs/internal/StackTraceBuilder.cjs +2 -4
- package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
- package/_mjs/Cached/api.mjs +8 -2
- package/_mjs/Cached/api.mjs.map +1 -1
- package/_mjs/Cached/definition.mjs +1 -5
- package/_mjs/Cached/definition.mjs.map +1 -1
- package/_mjs/CancellerState.mjs +4 -7
- package/_mjs/CancellerState.mjs.map +1 -1
- package/_mjs/Channel/UpstreamPullRequest/definition.mjs +4 -2
- package/_mjs/Channel/UpstreamPullRequest/definition.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +2 -3
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/definition.mjs +21 -15
- package/_mjs/Channel/definition.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +35 -11
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelState.mjs +15 -8
- package/_mjs/Channel/internal/ChannelState.mjs.map +1 -1
- package/_mjs/Channel/internal/MergeDecision.mjs +5 -7
- package/_mjs/Channel/internal/MergeDecision.mjs.map +1 -1
- package/_mjs/Channel/internal/MergeState.mjs +7 -3
- package/_mjs/Channel/internal/MergeState.mjs.map +1 -1
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +49 -42
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
- package/_mjs/Clock/live.mjs +1 -4
- package/_mjs/Clock/live.mjs.map +1 -1
- package/_mjs/CountdownLatch.mjs +21 -11
- package/_mjs/CountdownLatch.mjs.map +1 -1
- package/_mjs/Differ/api.mjs +3 -12
- package/_mjs/Differ/api.mjs.map +1 -1
- package/_mjs/Differ/definition.mjs +1 -5
- package/_mjs/Differ/definition.mjs.map +1 -1
- package/_mjs/Fiber/FiberMessage.mjs +6 -3
- package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +66 -61
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/Fiber/definition.mjs +9 -5
- package/_mjs/Fiber/definition.mjs.map +1 -1
- package/_mjs/FiberDescriptor.mjs +3 -0
- package/_mjs/FiberDescriptor.mjs.map +1 -1
- package/_mjs/FiberRef/definition.mjs +9 -6
- package/_mjs/FiberRef/definition.mjs.map +1 -1
- package/_mjs/FiberRefs/Patch.mjs +13 -13
- package/_mjs/FiberRefs/Patch.mjs.map +1 -1
- package/_mjs/FiberScope/definition.mjs +2 -0
- package/_mjs/FiberScope/definition.mjs.map +1 -1
- package/_mjs/FiberSet.mjs +4 -3
- package/_mjs/FiberSet.mjs.map +1 -1
- package/_mjs/FiberStatus/definition.mjs +12 -9
- package/_mjs/FiberStatus/definition.mjs.map +1 -1
- package/_mjs/Future/State.mjs +8 -7
- package/_mjs/Future/State.mjs.map +1 -1
- package/_mjs/Future/definition.mjs +3 -3
- package/_mjs/Future/definition.mjs.map +1 -1
- package/_mjs/Hub/api.mjs +61 -44
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/Hub/definition.mjs +3 -7
- package/_mjs/Hub/definition.mjs.map +1 -1
- package/_mjs/Hub/internal.mjs +130 -110
- package/_mjs/Hub/internal.mjs.map +1 -1
- package/_mjs/IO/api/foreachExec.mjs +27 -4
- package/_mjs/IO/api/foreachExec.mjs.map +1 -1
- package/_mjs/IO/api/transplant.mjs +8 -7
- package/_mjs/IO/api/transplant.mjs.map +1 -1
- package/_mjs/IO/api.mjs +9 -4
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +7 -11
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +64 -61
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/InterruptStatus/definition.mjs +1 -0
- package/_mjs/InterruptStatus/definition.mjs.map +1 -1
- package/_mjs/Layer/MemoMap.mjs +25 -24
- package/_mjs/Layer/MemoMap.mjs.map +1 -1
- package/_mjs/Layer/definition.mjs +29 -12
- package/_mjs/Layer/definition.mjs.map +1 -1
- package/_mjs/LogLevel.mjs +3 -0
- package/_mjs/LogLevel.mjs.map +1 -1
- package/_mjs/LogSpan.mjs +2 -0
- package/_mjs/LogSpan.mjs.map +1 -1
- package/_mjs/Logger/definition.mjs +1 -0
- package/_mjs/Logger/definition.mjs.map +1 -1
- package/_mjs/MVar/definition.mjs +2 -3
- package/_mjs/MVar/definition.mjs.map +1 -1
- package/_mjs/Push/Bounds.mjs +2 -0
- package/_mjs/Push/Bounds.mjs.map +1 -0
- package/_mjs/Push/FlattenStrategy.mjs +87 -0
- package/_mjs/Push/FlattenStrategy.mjs.map +1 -0
- package/_mjs/Push/IndexedBuffer.mjs +65 -0
- package/_mjs/Push/IndexedBuffer.mjs.map +1 -0
- package/_mjs/Push/MergeStrategy.mjs +36 -0
- package/_mjs/Push/MergeStrategy.mjs.map +1 -0
- package/_mjs/Push/Operator/IOLoopOperator.mjs +208 -0
- package/_mjs/Push/Operator/IOLoopOperator.mjs.map +1 -0
- package/_mjs/Push/Operator/IOOperator.mjs +91 -0
- package/_mjs/Push/Operator/IOOperator.mjs.map +1 -0
- package/_mjs/Push/Operator/LoopOperator.mjs +151 -0
- package/_mjs/Push/Operator/LoopOperator.mjs.map +1 -0
- package/_mjs/Push/Operator/SyncOperator.mjs +67 -0
- package/_mjs/Push/Operator/SyncOperator.mjs.map +1 -0
- package/_mjs/Push/Operator.mjs +2 -0
- package/_mjs/Push/Operator.mjs.map +1 -0
- package/_mjs/Push/Producer/IOProducer.mjs +60 -0
- package/_mjs/Push/Producer/IOProducer.mjs.map +1 -0
- package/_mjs/Push/Producer/SyncProducer.mjs +94 -0
- package/_mjs/Push/Producer/SyncProducer.mjs.map +1 -0
- package/_mjs/Push/Producer.mjs +2 -0
- package/_mjs/Push/Producer.mjs.map +1 -0
- package/_mjs/Push/Sink.mjs +225 -0
- package/_mjs/Push/Sink.mjs.map +1 -0
- package/_mjs/Push/api.mjs +340 -348
- package/_mjs/Push/api.mjs.map +1 -1
- package/_mjs/Push/definition.mjs +75 -21
- package/_mjs/Push/definition.mjs.map +1 -1
- package/_mjs/Push/internal.mjs +30 -26
- package/_mjs/Push/internal.mjs.map +1 -1
- package/_mjs/Push.mjs +7 -1
- package/_mjs/Push.mjs.map +1 -1
- package/_mjs/Queue/api/dimapIO.mjs +74 -32
- package/_mjs/Queue/api/dimapIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterInputIO.mjs +51 -25
- package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterOutputIO.mjs +60 -30
- package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
- package/_mjs/Queue/api/zipWithIO.mjs +27 -10
- package/_mjs/Queue/api/zipWithIO.mjs.map +1 -1
- package/_mjs/Queue/definition.mjs +3 -7
- package/_mjs/Queue/definition.mjs.map +1 -1
- package/_mjs/Queue/internal.mjs +73 -62
- package/_mjs/Queue/internal.mjs.map +1 -1
- package/_mjs/Queue/strategy.mjs +1 -3
- package/_mjs/Queue/strategy.mjs.map +1 -1
- package/_mjs/Random/live.mjs +4 -3
- package/_mjs/Random/live.mjs.map +1 -1
- package/_mjs/Ref/Atomic.mjs +2 -3
- package/_mjs/Ref/Atomic.mjs.map +1 -1
- package/_mjs/Ref/Derived.mjs +2 -3
- package/_mjs/Ref/Derived.mjs.map +1 -1
- package/_mjs/Ref/DerivedAll.mjs +2 -3
- package/_mjs/Ref/DerivedAll.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs +16 -15
- package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
- package/_mjs/Ref/definition.mjs +1 -5
- package/_mjs/Ref/definition.mjs.map +1 -1
- package/_mjs/Reloadable/definition.mjs +2 -0
- package/_mjs/Reloadable/definition.mjs.map +1 -1
- package/_mjs/STM/definition.mjs +29 -24
- package/_mjs/STM/definition.mjs.map +1 -1
- package/_mjs/STM/driver.mjs +5 -0
- package/_mjs/STM/driver.mjs.map +1 -1
- package/_mjs/STM/internal/Entry.mjs +8 -5
- package/_mjs/STM/internal/Entry.mjs.map +1 -1
- package/_mjs/STM/internal/TryCommit.mjs +6 -7
- package/_mjs/STM/internal/TryCommit.mjs.map +1 -1
- package/_mjs/STM/internal/Versioned.mjs +2 -3
- package/_mjs/STM/internal/Versioned.mjs.map +1 -1
- package/_mjs/Schedule/Decision.mjs +3 -4
- package/_mjs/Schedule/Decision.mjs.map +1 -1
- package/_mjs/Schedule/Driver.mjs +4 -0
- package/_mjs/Schedule/Driver.mjs.map +1 -1
- package/_mjs/Schedule/api.mjs +2 -5
- package/_mjs/Schedule/api.mjs.map +1 -1
- package/_mjs/Schedule/definition.mjs +3 -1
- package/_mjs/Schedule/definition.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/definition.mjs +8 -2
- package/_mjs/Scope/ReleaseMap/definition.mjs.map +1 -1
- package/_mjs/Scope/api.mjs +23 -8
- package/_mjs/Scope/api.mjs.map +1 -1
- package/_mjs/Scope/definition.mjs +2 -6
- package/_mjs/Scope/definition.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +8 -3
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/ScopedRef/definition.mjs +1 -5
- package/_mjs/ScopedRef/definition.mjs.map +1 -1
- package/_mjs/Semaphore/Reservation.mjs +2 -0
- package/_mjs/Semaphore/Reservation.mjs.map +1 -1
- package/_mjs/Semaphore/definition.mjs +42 -38
- package/_mjs/Semaphore/definition.mjs.map +1 -1
- package/_mjs/Sink/definition.mjs +3 -3
- package/_mjs/Sink/definition.mjs.map +1 -1
- package/_mjs/State/api.mjs +1 -4
- package/_mjs/State/api.mjs.map +1 -1
- package/_mjs/State/definition.mjs +1 -5
- package/_mjs/State/definition.mjs.map +1 -1
- package/_mjs/State/internal.mjs +1 -5
- package/_mjs/State/internal.mjs.map +1 -1
- package/_mjs/Stream/api/zipAllWith.mjs +7 -11
- package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
- package/_mjs/Stream/api/zipWithChunks.mjs +5 -5
- package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +8 -7
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/Stream/definition.mjs +2 -3
- package/_mjs/Stream/definition.mjs.map +1 -1
- package/_mjs/Stream/internal/DebounceState.mjs +5 -5
- package/_mjs/Stream/internal/DebounceState.mjs.map +1 -1
- package/_mjs/Stream/internal/Handoff.mjs +17 -16
- package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
- package/_mjs/Stream/internal/SinkEndReason.mjs +4 -11
- package/_mjs/Stream/internal/SinkEndReason.mjs.map +1 -1
- package/_mjs/Stream/internal/Take.mjs +3 -0
- package/_mjs/Stream/internal/Take.mjs.map +1 -1
- package/_mjs/Subject/Atomic.mjs +46 -15
- package/_mjs/Subject/Atomic.mjs.map +1 -1
- package/_mjs/Subject/DeferredRef.mjs +48 -0
- package/_mjs/Subject/DeferredRef.mjs.map +1 -0
- package/_mjs/Subject/Hold.mjs +30 -0
- package/_mjs/Subject/Hold.mjs.map +1 -0
- package/_mjs/Subject/RefSubject/Atomic.mjs +163 -0
- package/_mjs/Subject/RefSubject/Atomic.mjs.map +1 -0
- package/_mjs/Subject/RefSubject/Derived.mjs +95 -0
- package/_mjs/Subject/RefSubject/Derived.mjs.map +1 -0
- package/_mjs/Subject/RefSubject/RefSubject.mjs +11 -0
- package/_mjs/Subject/RefSubject/RefSubject.mjs.map +1 -0
- package/_mjs/Subject/RefSubject/constructors.mjs +23 -0
- package/_mjs/Subject/RefSubject/constructors.mjs.map +1 -0
- package/_mjs/Subject/RefSubject.mjs +2 -0
- package/_mjs/Subject/RefSubject.mjs.map +1 -0
- package/_mjs/Subject/definition.mjs +9 -0
- package/_mjs/Subject/definition.mjs.map +1 -1
- package/_mjs/Subject.mjs +3 -0
- package/_mjs/Subject.mjs.map +1 -1
- package/_mjs/SubscriptionRef.mjs +4 -5
- package/_mjs/SubscriptionRef.mjs.map +1 -1
- package/_mjs/Supervisor/constructors.mjs +3 -11
- package/_mjs/Supervisor/constructors.mjs.map +1 -1
- package/_mjs/Supervisor/definition.mjs +10 -4
- package/_mjs/Supervisor/definition.mjs.map +1 -1
- package/_mjs/SupervisorPatch.mjs +9 -12
- package/_mjs/SupervisorPatch.mjs.map +1 -1
- package/_mjs/TExit/definition.mjs +19 -18
- package/_mjs/TExit/definition.mjs.map +1 -1
- package/_mjs/TReentrantLock/definition.mjs +8 -3
- package/_mjs/TReentrantLock/definition.mjs.map +1 -1
- package/_mjs/TRef/definition.mjs +6 -6
- package/_mjs/TRef/definition.mjs.map +1 -1
- package/_mjs/internal/BackgroundScheduler.mjs +16 -16
- package/_mjs/internal/BackgroundScheduler.mjs.map +1 -1
- package/_mjs/internal/HashedPair.mjs +2 -0
- package/_mjs/internal/HashedPair.mjs.map +1 -1
- package/_mjs/internal/Hub.mjs +39 -15
- package/_mjs/internal/Hub.mjs.map +1 -1
- package/_mjs/internal/IsFatal.mjs +7 -11
- package/_mjs/internal/IsFatal.mjs.map +1 -1
- package/_mjs/internal/MutableQueue.mjs +14 -11
- package/_mjs/internal/MutableQueue.mjs.map +1 -1
- package/_mjs/internal/Scheduler.mjs +4 -8
- package/_mjs/internal/Scheduler.mjs.map +1 -1
- package/_mjs/internal/StackTraceBuilder.mjs +2 -4
- package/_mjs/internal/StackTraceBuilder.mjs.map +1 -1
- package/_src/Cached/api.ts +8 -2
- package/_src/Channel/internal/SingleProducerAsyncInput.ts +6 -4
- package/_src/CountdownLatch.ts +24 -13
- package/_src/Fiber/FiberRuntime.ts +4 -2
- package/_src/FiberRef/definition.ts +1 -1
- package/_src/Hub/api.ts +85 -54
- package/_src/Hub/internal.ts +36 -20
- package/_src/IO/api/foreachExec.ts +47 -0
- package/_src/IO/api.ts +0 -5
- package/_src/Push/Bounds.ts +4 -0
- package/_src/Push/FlattenStrategy.ts +137 -0
- package/_src/Push/IndexedBuffer.ts +79 -0
- package/_src/Push/MergeStrategy.ts +59 -0
- package/_src/Push/Operator/IOLoopOperator.ts +413 -0
- package/_src/Push/Operator/IOOperator.ts +173 -0
- package/_src/Push/Operator/LoopOperator.ts +242 -0
- package/_src/Push/Operator/SyncOperator.ts +107 -0
- package/_src/Push/Operator.ts +7 -0
- package/_src/Push/Producer/IOProducer.ts +83 -0
- package/_src/Push/Producer/SyncProducer.ts +105 -0
- package/_src/Push/Producer.ts +0 -0
- package/_src/Push/Sink.ts +302 -0
- package/_src/Push/api.ts +389 -515
- package/_src/Push/definition.ts +216 -23
- package/_src/Push/internal.ts +11 -0
- package/_src/Push.ts +7 -1
- package/_src/Queue/api/dimapIO.ts +57 -19
- package/_src/Queue/api/filterInputIO.ts +36 -12
- package/_src/Queue/api/filterOutputIO.ts +42 -18
- package/_src/Queue/api/zipWithIO.ts +23 -11
- package/_src/Queue/internal.ts +9 -3
- package/_src/Ref/Synchronized/definition.ts +81 -37
- package/_src/Ref/definition.ts +26 -0
- package/_src/Schedule/api.ts +1 -1
- package/_src/Scope/api.ts +22 -0
- package/_src/ScopedRef/api.ts +6 -2
- package/_src/Semaphore/definition.ts +4 -2
- package/_src/Sink/definition.ts +4 -5
- package/_src/Stream/api.ts +0 -2
- package/_src/Stream/definition.ts +0 -1
- package/_src/Subject/Atomic.ts +68 -11
- package/_src/Subject/DeferredRef.ts +44 -0
- package/_src/Subject/Hold.ts +48 -0
- package/_src/Subject/RefSubject/Atomic.ts +233 -0
- package/_src/Subject/RefSubject/Derived.ts +184 -0
- package/_src/Subject/RefSubject/RefSubject.ts +100 -0
- package/_src/Subject/RefSubject/constructors.ts +27 -0
- package/_src/Subject/RefSubject.ts +7 -0
- package/_src/Subject/definition.ts +21 -3
- package/_src/Subject.ts +6 -3
- package/_src/SubscriptionRef.ts +1 -1
- package/_src/Supervisor/constructors.ts +0 -2
- package/_src/Supervisor/definition.ts +2 -1
- package/_src/TReentrantLock/api.ts +1 -1
- package/_src/global.ts +8 -0
- package/_src/index.ts +49 -50
- package/_src/internal/MutableQueue.ts +5 -3
- package/global.d.ts +8 -0
- package/index.d.ts +0 -1
- package/internal/MutableQueue.d.ts +2 -2
- package/package.json +4 -4
- package/RefSubject/Atomic.d.ts +0 -34
- package/RefSubject/Synchronized/api.d.ts +0 -9
- package/RefSubject/Synchronized/definition.d.ts +0 -39
- package/RefSubject/api.d.ts +0 -120
- package/RefSubject/definition.d.ts +0 -52
- package/RefSubject.d.ts +0 -3
- package/_cjs/RefSubject/Atomic.cjs +0 -107
- package/_cjs/RefSubject/Atomic.cjs.map +0 -1
- package/_cjs/RefSubject/Synchronized/api.cjs +0 -22
- package/_cjs/RefSubject/Synchronized/api.cjs.map +0 -1
- package/_cjs/RefSubject/Synchronized/definition.cjs +0 -55
- package/_cjs/RefSubject/Synchronized/definition.cjs.map +0 -1
- package/_cjs/RefSubject/api.cjs +0 -251
- package/_cjs/RefSubject/api.cjs.map +0 -1
- package/_cjs/RefSubject/definition.cjs +0 -26
- package/_cjs/RefSubject/definition.cjs.map +0 -1
- package/_cjs/RefSubject.cjs +0 -39
- package/_cjs/RefSubject.cjs.map +0 -1
- package/_mjs/RefSubject/Atomic.mjs +0 -99
- package/_mjs/RefSubject/Atomic.mjs.map +0 -1
- package/_mjs/RefSubject/Synchronized/api.mjs +0 -15
- package/_mjs/RefSubject/Synchronized/api.mjs.map +0 -1
- package/_mjs/RefSubject/Synchronized/definition.mjs +0 -47
- package/_mjs/RefSubject/Synchronized/definition.mjs.map +0 -1
- package/_mjs/RefSubject/api.mjs +0 -229
- package/_mjs/RefSubject/api.mjs.map +0 -1
- package/_mjs/RefSubject/definition.mjs +0 -19
- package/_mjs/RefSubject/definition.mjs.map +0 -1
- package/_mjs/RefSubject.mjs +0 -5
- package/_mjs/RefSubject.mjs.map +0 -1
- package/_src/RefSubject/Atomic.ts +0 -129
- package/_src/RefSubject/Synchronized/api.ts +0 -14
- package/_src/RefSubject/Synchronized/definition.ts +0 -76
- package/_src/RefSubject/api.ts +0 -253
- package/_src/RefSubject/definition.ts +0 -70
- package/_src/RefSubject.ts +0 -5
package/_src/index.ts
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
1
|
/* eslint-disable simple-import-sort/exports */
|
|
2
2
|
// codegen:start { preset: type-barrel, include: ./*.ts }
|
|
3
|
-
export type {} from "./global.js"
|
|
4
|
-
export type {} from "./TxnId.js"
|
|
5
|
-
export type {} from "./TSemaphore.js"
|
|
6
|
-
export type {} from "./TRef.js"
|
|
7
|
-
export type {} from "./TReentrantLock.js"
|
|
8
|
-
export type {} from "./TFuture.js"
|
|
9
|
-
export type {} from "./TExit.js"
|
|
10
|
-
export type {} from "./SupervisorPatch.js"
|
|
11
|
-
export type {} from "./Supervisor.js"
|
|
12
|
-
export type {} from "./SubscriptionRef.js"
|
|
13
|
-
export type {} from "./Subject.js"
|
|
14
|
-
export type {} from "./Stream.js"
|
|
15
|
-
export type {} from "./State.js"
|
|
16
|
-
export type {} from "./Sink.js"
|
|
17
|
-
export type {} from "./Semaphore.js"
|
|
18
|
-
export type {} from "./ScopedRef.js"
|
|
19
|
-
export type {} from "./Scope.js"
|
|
20
|
-
export type {} from "./Schedule.js"
|
|
21
|
-
export type {} from "./STM.js"
|
|
22
|
-
export type {} from "./RuntimeFlags.js"
|
|
23
|
-
export type {} from "./RuntimeFlag.js"
|
|
24
|
-
export type {} from "./Reloadable.js"
|
|
25
|
-
export type {} from "./
|
|
26
|
-
export type {} from "./
|
|
27
|
-
export type {} from "./
|
|
28
|
-
export type {} from "./
|
|
29
|
-
export type {} from "./
|
|
30
|
-
export type {} from "./
|
|
31
|
-
export type {} from "./
|
|
32
|
-
export type {} from "./
|
|
33
|
-
export type {} from "./
|
|
34
|
-
export type {} from "./
|
|
35
|
-
export type {} from "./
|
|
36
|
-
export type {} from "./
|
|
37
|
-
export type {} from "./
|
|
38
|
-
export type {} from "./
|
|
39
|
-
export type {} from "./
|
|
40
|
-
export type {} from "./
|
|
41
|
-
export type {} from "./
|
|
42
|
-
export type {} from "./
|
|
43
|
-
export type {} from "./
|
|
44
|
-
export type {} from "./
|
|
45
|
-
export type {} from "./
|
|
46
|
-
export type {} from "./
|
|
47
|
-
export type {} from "./
|
|
48
|
-
export type {} from "./
|
|
49
|
-
export type {} from "./
|
|
50
|
-
export type {} from "./
|
|
51
|
-
export type {} from "./
|
|
52
|
-
export type {} from "./Cached.js";
|
|
3
|
+
export type {} from "./global.js"
|
|
4
|
+
export type {} from "./TxnId.js"
|
|
5
|
+
export type {} from "./TSemaphore.js"
|
|
6
|
+
export type {} from "./TRef.js"
|
|
7
|
+
export type {} from "./TReentrantLock.js"
|
|
8
|
+
export type {} from "./TFuture.js"
|
|
9
|
+
export type {} from "./TExit.js"
|
|
10
|
+
export type {} from "./SupervisorPatch.js"
|
|
11
|
+
export type {} from "./Supervisor.js"
|
|
12
|
+
export type {} from "./SubscriptionRef.js"
|
|
13
|
+
export type {} from "./Subject.js"
|
|
14
|
+
export type {} from "./Stream.js"
|
|
15
|
+
export type {} from "./State.js"
|
|
16
|
+
export type {} from "./Sink.js"
|
|
17
|
+
export type {} from "./Semaphore.js"
|
|
18
|
+
export type {} from "./ScopedRef.js"
|
|
19
|
+
export type {} from "./Scope.js"
|
|
20
|
+
export type {} from "./Schedule.js"
|
|
21
|
+
export type {} from "./STM.js"
|
|
22
|
+
export type {} from "./RuntimeFlags.js"
|
|
23
|
+
export type {} from "./RuntimeFlag.js"
|
|
24
|
+
export type {} from "./Reloadable.js"
|
|
25
|
+
export type {} from "./Ref.js"
|
|
26
|
+
export type {} from "./Random.js"
|
|
27
|
+
export type {} from "./Queue.js"
|
|
28
|
+
export type {} from "./Push.js"
|
|
29
|
+
export type {} from "./MVar.js"
|
|
30
|
+
export type {} from "./Logger.js"
|
|
31
|
+
export type {} from "./LogSpan.js"
|
|
32
|
+
export type {} from "./LogLevel.js"
|
|
33
|
+
export type {} from "./Layer.js"
|
|
34
|
+
export type {} from "./InterruptStatus.js"
|
|
35
|
+
export type {} from "./IOEnv.js"
|
|
36
|
+
export type {} from "./IO.js"
|
|
37
|
+
export type {} from "./Hub.js"
|
|
38
|
+
export type {} from "./Future.js"
|
|
39
|
+
export type {} from "./FiberStatus.js"
|
|
40
|
+
export type {} from "./FiberSet.js"
|
|
41
|
+
export type {} from "./FiberScope.js"
|
|
42
|
+
export type {} from "./FiberRefs.js"
|
|
43
|
+
export type {} from "./FiberRef.js"
|
|
44
|
+
export type {} from "./FiberDescriptor.js"
|
|
45
|
+
export type {} from "./Fiber.js"
|
|
46
|
+
export type {} from "./CountdownLatch.js"
|
|
47
|
+
export type {} from "./Console.js"
|
|
48
|
+
export type {} from "./Clock.js"
|
|
49
|
+
export type {} from "./Channel.js"
|
|
50
|
+
export type {} from "./CancellerState.js"
|
|
51
|
+
export type {} from "./Cached.js"
|
|
53
52
|
// codegen:end
|
|
@@ -171,12 +171,14 @@ export class LinkedQueue<A> extends MutableQueue<A> {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
export abstract class RingBuffer<A> extends MutableQueue<A> {
|
|
174
|
+
private buf: Array<any>;
|
|
175
|
+
private head = 0;
|
|
176
|
+
private tail = 0;
|
|
177
|
+
|
|
174
178
|
constructor(readonly capacity: number) {
|
|
175
179
|
super();
|
|
180
|
+
this.buf = new Array(this.capacity);
|
|
176
181
|
}
|
|
177
|
-
private buf: Array<any> = new Array(this.capacity);
|
|
178
|
-
private head = 0;
|
|
179
|
-
private tail = 0;
|
|
180
182
|
|
|
181
183
|
abstract posToIdx(pos: number, capacity: number): number;
|
|
182
184
|
|
package/global.d.ts
CHANGED
|
@@ -134,6 +134,14 @@ import { STM, USTM } from "@fncts/io/STM/definition";
|
|
|
134
134
|
* @tsplus global
|
|
135
135
|
*/
|
|
136
136
|
import { Stream } from "@fncts/io/Stream/definition";
|
|
137
|
+
/**
|
|
138
|
+
* @tsplus global
|
|
139
|
+
*/
|
|
140
|
+
import { Subject } from "@fncts/io/Subject";
|
|
141
|
+
/**
|
|
142
|
+
* @tsplus global
|
|
143
|
+
*/
|
|
144
|
+
import { PRefSubject, RefSubject } from "@fncts/io/Subject/RefSubject/RefSubject";
|
|
137
145
|
/**
|
|
138
146
|
* @tsplus global
|
|
139
147
|
*/
|
package/index.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export type {} from "./STM.js";
|
|
|
20
20
|
export type {} from "./RuntimeFlags.js";
|
|
21
21
|
export type {} from "./RuntimeFlag.js";
|
|
22
22
|
export type {} from "./Reloadable.js";
|
|
23
|
-
export type {} from "./RefSubject.js";
|
|
24
23
|
export type {} from "./Ref.js";
|
|
25
24
|
export type {} from "./Random.js";
|
|
26
25
|
export type {} from "./Queue.js";
|
|
@@ -60,7 +60,7 @@ export declare class OneElementMutableQueue<A> extends MutableQueue<A> {
|
|
|
60
60
|
capacity: number;
|
|
61
61
|
get isEmpty(): boolean;
|
|
62
62
|
get isFull(): boolean;
|
|
63
|
-
get size():
|
|
63
|
+
get size(): 0 | 1;
|
|
64
64
|
enqueue(a: A): boolean;
|
|
65
65
|
dequeue(a: A): A;
|
|
66
66
|
dequeue(a: A | undefined): A | undefined;
|
|
@@ -79,10 +79,10 @@ export declare class LinkedQueue<A> extends MutableQueue<A> {
|
|
|
79
79
|
}
|
|
80
80
|
export declare abstract class RingBuffer<A> extends MutableQueue<A> {
|
|
81
81
|
readonly capacity: number;
|
|
82
|
-
constructor(capacity: number);
|
|
83
82
|
private buf;
|
|
84
83
|
private head;
|
|
85
84
|
private tail;
|
|
85
|
+
constructor(capacity: number);
|
|
86
86
|
abstract posToIdx(pos: number, capacity: number): number;
|
|
87
87
|
get size(): number;
|
|
88
88
|
get enqueuedCount(): number;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fncts/io",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@fncts/base": "0.0.
|
|
6
|
-
"@fncts/transformers": "0.0.
|
|
7
|
-
"@fncts/typelevel": "0.0.
|
|
5
|
+
"@fncts/base": "0.0.43",
|
|
6
|
+
"@fncts/transformers": "0.0.15",
|
|
7
|
+
"@fncts/typelevel": "0.0.24"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
"./*": {
|
package/RefSubject/Atomic.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Just } from "@fncts/base/data/Maybe/definition";
|
|
2
|
-
import { IO } from "@fncts/io/IO/definition";
|
|
3
|
-
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
4
|
-
import type { Sink } from "@fncts/io/Push";
|
|
5
|
-
import { Hold } from "@fncts/io/Push";
|
|
6
|
-
import { Atomic } from "@fncts/io/Ref";
|
|
7
|
-
import { RefSubjectInternal } from "@fncts/io/RefSubject/definition";
|
|
8
|
-
export declare class AtomicRefSubject<E, A> extends RefSubjectInternal<never, E, A, A> {
|
|
9
|
-
readonly initial: A;
|
|
10
|
-
readonly stream: Hold<never, E, A>;
|
|
11
|
-
readonly maybeRef: Atomic<import("@fncts/base/data/Maybe").Maybe<A>>;
|
|
12
|
-
readonly ref: AtomicEmitRef<E, A>;
|
|
13
|
-
constructor(initial: A);
|
|
14
|
-
get get(): import("../IO").UIO<A>;
|
|
15
|
-
set(value: A, __tsplusTrace?: string): import("../IO").IO<never, never, void>;
|
|
16
|
-
modify<E, A, B>(this: AtomicRefSubject<E, A>, f: (a: A) => readonly [B, A], __tsplusTrace?: string): IO<never, never, B>;
|
|
17
|
-
run<R>(emitter: Sink<R, E, A>): IO<R, never, unknown>;
|
|
18
|
-
event(value: A): IO<never, never, void>;
|
|
19
|
-
error(cause: Cause<E>): IO<never, never, void>;
|
|
20
|
-
unsafeEvent(value: A): void;
|
|
21
|
-
unsafeError(cause: Cause<E>): void;
|
|
22
|
-
get unsafeGet(): A;
|
|
23
|
-
}
|
|
24
|
-
declare class AtomicEmitRef<E, A> extends Atomic<A> {
|
|
25
|
-
readonly ref: Atomic<A>;
|
|
26
|
-
readonly sink: Sink<never, E, A>;
|
|
27
|
-
constructor(ref: Atomic<A>, sink: Sink<never, E, A>);
|
|
28
|
-
get get(): import("../IO").UIO<A>;
|
|
29
|
-
get unsafeGet(): A;
|
|
30
|
-
unsafeSet(value: A): void;
|
|
31
|
-
set(value: A, __tsplusTrace?: string): import("../IO").IO<never, never, void>;
|
|
32
|
-
modify<B>(f: (a: A) => readonly [B, A], __tsplusTrace?: string): import("../IO").IO<never, never, B>;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Lazy } from "@fncts/base/data/function/definition";
|
|
2
|
-
import { UIO } from "@fncts/io/IO/definition";
|
|
3
|
-
import { RefSubject } from "@fncts/io/RefSubject";
|
|
4
|
-
/**
|
|
5
|
-
* @tsplus static fncts.io.Push.RefSubject.SynchronizedOps make
|
|
6
|
-
* @tsplus static fncts.io.Push.RefSubject.SynchronizedOps __call
|
|
7
|
-
* @tsplus location "@fncts/io/RefSubject/Synchronized/api"
|
|
8
|
-
*/
|
|
9
|
-
export declare function make<A>(initial: Lazy<A>): UIO<RefSubject.Synchronized<never, never, A, A>>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TSemaphore } from "@fncts/io/TSemaphore/definition";
|
|
2
|
-
import type { RefSubject } from "../definition.js";
|
|
3
|
-
import type { Cause } from "@fncts/base/data/Cause";
|
|
4
|
-
import type { Sink } from "@fncts/io/Push";
|
|
5
|
-
import { IO } from "@fncts/io/IO";
|
|
6
|
-
import { RefSubjectInternal } from "../definition.js";
|
|
7
|
-
export declare const SynchronizedRefSubjectTypeId: unique symbol;
|
|
8
|
-
export type SynchronizedRefSubjectTypeId = typeof SynchronizedRefSubjectTypeId;
|
|
9
|
-
/**
|
|
10
|
-
* @tsplus type fncts.io.Push.RefSubject.Synchronized
|
|
11
|
-
*/
|
|
12
|
-
export interface SynchronizedRefSubject<R, E, A, B> extends RefSubject<R, E, A, B> {
|
|
13
|
-
readonly [SynchronizedRefSubjectTypeId]: SynchronizedRefSubjectTypeId;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @tsplus type fncts.io.Push.RefSubject.SynchronizedOps
|
|
17
|
-
*/
|
|
18
|
-
export interface SynchronizedRefSubjectOps {
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @tsplus static fncts.io.Push.RefSubjectOps Synchronized
|
|
22
|
-
* @tsplus location "@fncts/io/RefSubject/Synchronized/definition"
|
|
23
|
-
*/
|
|
24
|
-
export declare const Synchronized: SynchronizedRefSubjectOps;
|
|
25
|
-
export declare class SynchronizedRefSubjectInternal<R, E, A, B> extends RefSubjectInternal<R, E, A, B> implements SynchronizedRefSubject<R, E, A, B> {
|
|
26
|
-
readonly semaphore: TSemaphore;
|
|
27
|
-
readonly ref: RefSubjectInternal<R, E, A, B>;
|
|
28
|
-
readonly [SynchronizedRefSubjectTypeId]: SynchronizedRefSubjectTypeId;
|
|
29
|
-
constructor(semaphore: TSemaphore, ref: RefSubjectInternal<R, E, A, B>);
|
|
30
|
-
get get(): IO<R, never, B>;
|
|
31
|
-
set(a: A, __tsplusTrace?: string | undefined): IO<R, never, void>;
|
|
32
|
-
run<R1>(emitter: Sink<R1, E, B>): IO<R | R1, never, void>;
|
|
33
|
-
modify<C>(f: (b: B) => readonly [C, A], __tsplusTrace?: string | undefined): IO<R, never, C>;
|
|
34
|
-
modifyIO<R1, E1, C>(f: (b: B) => IO<R1, E1, readonly [C, A]>, __tsplusTrace?: string): IO<R | R1, E1, C>;
|
|
35
|
-
event(value: A): IO<R, never, void>;
|
|
36
|
-
error(cause: Cause<E>): IO<R, never, void>;
|
|
37
|
-
withPermit<R, E, A>(io: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
|
38
|
-
get unsafeGet(): B;
|
|
39
|
-
}
|
package/RefSubject/api.d.ts
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { Lazy } from "@fncts/base/data/function/definition";
|
|
2
|
-
import { UIO, IO } from "@fncts/io/IO/definition";
|
|
3
|
-
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
4
|
-
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
5
|
-
import { RefSubject } from "./definition.js";
|
|
6
|
-
/**
|
|
7
|
-
* @tsplus static fncts.io.Push.RefSubjectOps unsafeMake
|
|
8
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
9
|
-
*/
|
|
10
|
-
export declare function unsafeMake<A>(initial: A): RefSubject<never, never, A, A>;
|
|
11
|
-
/**
|
|
12
|
-
* @tsplus static fncts.io.Push.RefSubjectOps make
|
|
13
|
-
* @tsplus static fncts.io.Push.RefSubjectOps __call
|
|
14
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
15
|
-
*/
|
|
16
|
-
export declare function make<A>(initial: Lazy<A>): UIO<RefSubject<never, never, A, A>>;
|
|
17
|
-
/**
|
|
18
|
-
* Reads the value from the `Ref`.
|
|
19
|
-
* @tsplus getter fncts.io.Push.RefSubject get
|
|
20
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
21
|
-
*/
|
|
22
|
-
export declare function get<R, E, A, B>(self: RefSubject<R, E, A, B>, __tsplusTrace?: string): IO<R, never, B>;
|
|
23
|
-
/**
|
|
24
|
-
* Writes a new value to the `Ref`, with a guarantee of immediate
|
|
25
|
-
* consistency (at some cost to performance).
|
|
26
|
-
* @tsplus pipeable fncts.io.Push.RefSubject set
|
|
27
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
28
|
-
*/
|
|
29
|
-
export declare function set<A>(a: A, __tsplusTrace?: string): <R, E, B>(self: RefSubject<R, E, A, B>) => IO<R, never, void>;
|
|
30
|
-
/**
|
|
31
|
-
* Transforms both the `set` and `get` values of the `Ref` with the
|
|
32
|
-
* specified functions.
|
|
33
|
-
* @tsplus pipeable fncts.io.Push.RefSubject dimap
|
|
34
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
35
|
-
*/
|
|
36
|
-
export declare function dimap<A, B, C, D>(f: (_: C) => A, g: (_: B) => D, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, B>) => RefSubject<R, E, C, D>;
|
|
37
|
-
/**
|
|
38
|
-
* Transforms the `set` value of the `Ref` with the specified function.
|
|
39
|
-
* @tsplus pipeable fncts.io.Push.RefSubject contramap
|
|
40
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
41
|
-
*/
|
|
42
|
-
export declare function contramap<A, C>(f: (_: C) => A, __tsplusTrace?: string): <R, E, B>(self: RefSubject<R, E, A, B>) => RefSubject<R, E, C, B>;
|
|
43
|
-
/**
|
|
44
|
-
* Transforms the `get` value of the `Ref` with the specified function.
|
|
45
|
-
* @tsplus pipeable fncts.io.Push.RefSubject map
|
|
46
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
47
|
-
*/
|
|
48
|
-
export declare function map<B, C>(f: (_: B) => C, __tsplusTrace?: string): <R, E, A>(ref: RefSubject<R, E, A, B>) => RefSubject<R, E, A, C>;
|
|
49
|
-
/**
|
|
50
|
-
* Atomically modifies the `Ref` with the specified function, which
|
|
51
|
-
* computes a return value for the modification. This is a more powerful
|
|
52
|
-
* version of `update`.
|
|
53
|
-
* @tsplus pipeable fncts.io.Push.RefSubject modify
|
|
54
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
55
|
-
*/
|
|
56
|
-
export declare function modify<B, A>(f: (a: A) => readonly [B, A], __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, never, B>;
|
|
57
|
-
/**
|
|
58
|
-
* Atomically modifies the `Ref` with the specified partial function,
|
|
59
|
-
* which computes a return value for the modification if the function is
|
|
60
|
-
* defined on the current value otherwise it returns a default value. This
|
|
61
|
-
* is a more powerful version of `updateJust`.
|
|
62
|
-
* @tsplus pipeable fncts.io.Push.RefSubject modifyJust
|
|
63
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
64
|
-
*/
|
|
65
|
-
export declare function modifyJust<A, B>(def: B, f: (a: A) => Maybe<readonly [B, A]>, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, never, B>;
|
|
66
|
-
/**
|
|
67
|
-
* Atomically writes the specified value to the `Ref`, returning the value
|
|
68
|
-
* immediately before modification.
|
|
69
|
-
* @tsplus pipeable fncts.io.Push.RefSubject getAndSet
|
|
70
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
71
|
-
*/
|
|
72
|
-
export declare function getAndSet<A>(a: A, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, never, A>;
|
|
73
|
-
/**
|
|
74
|
-
* Atomically modifies the `Ref` with the specified function, returning
|
|
75
|
-
* the value immediately before modification.
|
|
76
|
-
* @tsplus pipeable fncts.io.Push.RefSubject getAndUpdate
|
|
77
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
78
|
-
*/
|
|
79
|
-
export declare function getAndUpdate<A>(f: (a: A) => A, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, E, A>;
|
|
80
|
-
/**
|
|
81
|
-
* Atomically modifies the `Ref` with the specified partial function,
|
|
82
|
-
* returning the value immediately before modification. If the function is
|
|
83
|
-
* undefined on the current value it doesn't change it.
|
|
84
|
-
* @tsplus pipeable fncts.io.Push.RefSubject getAndUpdateJust
|
|
85
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
86
|
-
*/
|
|
87
|
-
export declare function getAndUpdateJust<A>(f: (a: A) => Maybe<A>, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, never, A>;
|
|
88
|
-
/**
|
|
89
|
-
* Atomically modifies the `Ref` with the specified function.
|
|
90
|
-
* @tsplus pipeable fncts.io.Push.RefSubject update
|
|
91
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
92
|
-
*/
|
|
93
|
-
export declare function update<A>(f: (a: A) => A, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, never, void>;
|
|
94
|
-
/**
|
|
95
|
-
* Atomically modifies the `Ref` with the specified function and returns
|
|
96
|
-
* the updated value.
|
|
97
|
-
* @tsplus pipeable fncts.io.Push.RefSubject updateAndGet
|
|
98
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
99
|
-
*/
|
|
100
|
-
export declare function updateAndGet<A>(f: (a: A) => A, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => import("../IO.js").IO<R, never, A>;
|
|
101
|
-
/**
|
|
102
|
-
* Atomically modifies the `Ref` with the specified partial function. If
|
|
103
|
-
* the function is undefined on the current value it doesn't change it.
|
|
104
|
-
* @tsplus pipeable fncts.io.Push.RefSubject updateJust
|
|
105
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
106
|
-
*/
|
|
107
|
-
export declare function updateJust<A>(f: (a: A) => Maybe<A>, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, never, void>;
|
|
108
|
-
/**
|
|
109
|
-
* Atomically modifies the `Ref` with the specified partial function. If
|
|
110
|
-
* the function is undefined on the current value it returns the old value
|
|
111
|
-
* without changing it.
|
|
112
|
-
* @tsplus pipeable fncts.io.Push.RefSubject updateJustAndGet
|
|
113
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
114
|
-
*/
|
|
115
|
-
export declare function updateJustAndGet<A>(f: (a: A) => Maybe<A>, __tsplusTrace?: string): <R, E>(self: RefSubject<R, E, A, A>) => IO<R, never, A>;
|
|
116
|
-
/**
|
|
117
|
-
* @tsplus getter fncts.io.Push.RefSubject unsafeGet
|
|
118
|
-
* @tsplus location "@fncts/io/RefSubject/api"
|
|
119
|
-
*/
|
|
120
|
-
export declare function unsafeGet<R, E, A, B>(self: RefSubject<R, E, A, B>): B;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { IO } from "@fncts/io/IO/definition";
|
|
2
|
-
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
3
|
-
import type { Sink } from "../Push.js";
|
|
4
|
-
import type { Push } from "../Push.js";
|
|
5
|
-
import type { ModifiableRef, ReadableRef, WritableRef } from "../Ref.js";
|
|
6
|
-
import type { SynchronizedRefSubject } from "@fncts/io/RefSubject/Synchronized/definition";
|
|
7
|
-
import { PushTypeId } from "../Push.js";
|
|
8
|
-
import { PushVariance } from "../Push.js";
|
|
9
|
-
import { RefVariance } from "../Ref.js";
|
|
10
|
-
/**
|
|
11
|
-
* @tsplus type fncts.io.Push.RefSubject
|
|
12
|
-
*/
|
|
13
|
-
export interface RefSubject<out R, in out E, in A, out B> extends Push<R, E, B>, Sink<R, E, A> {
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @tsplus type fncts.io.Push.RefSubjectOps
|
|
17
|
-
*/
|
|
18
|
-
export interface RefSubjectOps {
|
|
19
|
-
}
|
|
20
|
-
export declare const RefSubject: RefSubjectOps;
|
|
21
|
-
export declare namespace RefSubject {
|
|
22
|
-
type Synchronized<R, E, A, B> = SynchronizedRefSubject<R, E, A, B>;
|
|
23
|
-
}
|
|
24
|
-
export declare abstract class RefSubjectInternal<R, E, A, B> implements ReadableRef<R, never, B>, WritableRef<R, never, A>, ModifiableRef<R, R, never, never, A, B>, Push<R, E, B>, Sink<R, E, A> {
|
|
25
|
-
readonly [PushTypeId]: PushTypeId;
|
|
26
|
-
[RefVariance]: {
|
|
27
|
-
readonly _RA: (_: never) => R;
|
|
28
|
-
readonly _RB: (_: never) => R;
|
|
29
|
-
readonly _EA: (_: never) => never;
|
|
30
|
-
readonly _EB: (_: never) => never;
|
|
31
|
-
readonly _A: (_: A) => void;
|
|
32
|
-
readonly _B: (_: never) => B;
|
|
33
|
-
};
|
|
34
|
-
[PushVariance]: {
|
|
35
|
-
readonly _R: (_: never) => R;
|
|
36
|
-
readonly _E: (_: never) => E;
|
|
37
|
-
readonly _A: (_: A) => B;
|
|
38
|
-
};
|
|
39
|
-
abstract get get(): IO<R, never, B>;
|
|
40
|
-
abstract set(value: A): IO<R, never, void>;
|
|
41
|
-
abstract modify<C>(f: (b: B) => readonly [C, A], __tsplusTrace?: string): IO<R, never, C>;
|
|
42
|
-
abstract run<R1>(emitter: Sink<R1, E, B>): IO<R | R1, never, void>;
|
|
43
|
-
abstract error(cause: Cause<E>): IO<R, never, void>;
|
|
44
|
-
abstract event(value: A): IO<R, never, void>;
|
|
45
|
-
abstract get unsafeGet(): B;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* @tsplus static fncts.io.Push.RefSubjectOps concrete
|
|
49
|
-
* @tsplus macro remove
|
|
50
|
-
* @tsplus location "@fncts/io/RefSubject/definition"
|
|
51
|
-
*/
|
|
52
|
-
export declare function concrete<R, E, A, B>(_: RefSubject<R, E, A, B>): asserts _ is RefSubjectInternal<R, E, A, B>;
|
package/RefSubject.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.AtomicRefSubject = void 0;
|
|
7
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Push/api"));
|
|
8
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/api"));
|
|
9
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
|
|
10
|
-
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/runtime"));
|
|
11
|
-
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api"));
|
|
12
|
-
var _AtomicReference = /*#__PURE__*/require("@fncts/base/internal/AtomicReference");
|
|
13
|
-
var _Push = /*#__PURE__*/require("@fncts/io/Push");
|
|
14
|
-
var _Ref = /*#__PURE__*/require("@fncts/io/Ref");
|
|
15
|
-
var _definition = /*#__PURE__*/require("@fncts/io/RefSubject/definition");
|
|
16
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
-
const fileName_1 = "(@fncts/io) src/RefSubject/Atomic.ts";
|
|
18
|
-
class AtomicRefSubject extends _definition.RefSubjectInternal {
|
|
19
|
-
constructor(initial) {
|
|
20
|
-
super();
|
|
21
|
-
this.initial = initial;
|
|
22
|
-
this.stream = new _Push.Hold(tsplus_module_1.never);
|
|
23
|
-
this.maybeRef = new _Ref.Atomic(this.stream.current);
|
|
24
|
-
this.ref = new AtomicEmitRef(new AtomicDimapRef(this.maybeRef, v => tsplus_module_2.getOrElse(() => this.initial)(v), a => tsplus_module_3.just(a, fileName_1 + ":15:18")), this.stream);
|
|
25
|
-
this.stream.current.set(tsplus_module_3.just(initial, fileName_1 + ":22:33"));
|
|
26
|
-
}
|
|
27
|
-
get get() {
|
|
28
|
-
return this.ref.get;
|
|
29
|
-
}
|
|
30
|
-
set(value, __tsplusTrace) {
|
|
31
|
-
return this.ref.set(value, fileName_1 + ":30:24");
|
|
32
|
-
}
|
|
33
|
-
modify(f, __tsplusTrace) {
|
|
34
|
-
return this.ref.modify(f, fileName_1 + ":38:27");
|
|
35
|
-
}
|
|
36
|
-
run(emitter) {
|
|
37
|
-
return this.stream.run(emitter);
|
|
38
|
-
}
|
|
39
|
-
event(value) {
|
|
40
|
-
return this.stream.event(value);
|
|
41
|
-
}
|
|
42
|
-
error(cause) {
|
|
43
|
-
return this.stream.error(cause);
|
|
44
|
-
}
|
|
45
|
-
unsafeEvent(value) {
|
|
46
|
-
tsplus_module_4.unsafeRunFiber(this.stream.event(value), fileName_1 + ":54:44");
|
|
47
|
-
}
|
|
48
|
-
unsafeError(cause) {
|
|
49
|
-
tsplus_module_4.unsafeRunFiber(this.stream.error(cause), fileName_1 + ":58:44");
|
|
50
|
-
}
|
|
51
|
-
get unsafeGet() {
|
|
52
|
-
return this.ref.unsafeGet;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.AtomicRefSubject = AtomicRefSubject;
|
|
56
|
-
class AtomicDimapRef extends _Ref.Atomic {
|
|
57
|
-
constructor(ref, f, g) {
|
|
58
|
-
const value = new class extends _AtomicReference.AtomicReference {
|
|
59
|
-
constructor(ref, f, g) {
|
|
60
|
-
super(f(ref.initial));
|
|
61
|
-
this.ref = ref;
|
|
62
|
-
this.f = f;
|
|
63
|
-
this.g = g;
|
|
64
|
-
}
|
|
65
|
-
get get() {
|
|
66
|
-
return this.f(this.ref.get);
|
|
67
|
-
}
|
|
68
|
-
set(value) {
|
|
69
|
-
this.ref.set(this.g(value));
|
|
70
|
-
}
|
|
71
|
-
compareAndSet(old, value) {
|
|
72
|
-
return this.ref.compareAndSet(this.g(old), this.g(value));
|
|
73
|
-
}
|
|
74
|
-
getAndSet(value) {
|
|
75
|
-
return this.f(this.ref.getAndSet(this.g(value)));
|
|
76
|
-
}
|
|
77
|
-
}(ref.value, f, g);
|
|
78
|
-
super(value);
|
|
79
|
-
this.ref = ref;
|
|
80
|
-
this.f = f;
|
|
81
|
-
this.g = g;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
class AtomicEmitRef extends _Ref.Atomic {
|
|
85
|
-
constructor(ref, sink) {
|
|
86
|
-
super(ref.value);
|
|
87
|
-
this.ref = ref;
|
|
88
|
-
this.sink = sink;
|
|
89
|
-
}
|
|
90
|
-
get get() {
|
|
91
|
-
return this.ref.get;
|
|
92
|
-
}
|
|
93
|
-
get unsafeGet() {
|
|
94
|
-
return this.ref.unsafeGet;
|
|
95
|
-
}
|
|
96
|
-
unsafeSet(value) {
|
|
97
|
-
this.ref.unsafeSet(value);
|
|
98
|
-
tsplus_module_4.unsafeRunFiber(this.sink.event(value), fileName_1 + ":119:42");
|
|
99
|
-
}
|
|
100
|
-
set(value, __tsplusTrace) {
|
|
101
|
-
return tsplus_module_5.zipLeft(this.sink.event(value), fileName_1 + ":123:33")(this.ref.set(value));
|
|
102
|
-
}
|
|
103
|
-
modify(f, __tsplusTrace) {
|
|
104
|
-
return tsplus_module_5.zipLeft(tsplus_module_5.flatMap(value => this.sink.event(value), fileName_1 + ":127:53")(this.ref.get), fileName_1 + ":127:32")(this.ref.modify(f, fileName_1 + ":127:27"));
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=Atomic.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Atomic.cjs","names":["_AtomicReference","require","_Push","_Ref","_definition","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AtomicRefSubject","RefSubjectInternal","constructor","initial","stream","Hold","tsplus_module_1","never","maybeRef","Atomic","current","ref","AtomicEmitRef","AtomicDimapRef","v","tsplus_module_2","getOrElse","a","tsplus_module_3","just","fileName_1","value","__tsplusTrace","modify","run","emitter","event","error","cause","unsafeEvent","tsplus_module_4","unsafeRunFiber","unsafeError","unsafeGet","exports","g","AtomicReference","compareAndSet","old","getAndSet","sink","unsafeSet","tsplus_module_5","zipLeft","flatMap"],"sources":["../../_src/RefSubject/Atomic.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;AAEA,IAAAA,gBAAA,gBAAAC,OAAA;AACA,IAAAC,KAAA,gBAAAD,OAAA;AACA,IAAAE,IAAA,gBAAAF,OAAA;AACA,IAAAG,WAAA,gBAAAH,OAAA;AAAqE,SAAAI,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CA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C,cAAA,KAAI,CAACS,IAAI,CAACd,KAAK,CAACL,KAAK,CAAC,EAAAD,UAAA,aAAiB;EACzC;EAEA1B,GAAGA,CAAC2B,KAAQ,EAAEC,aAAsB;IAClC,OAAAoB,eAAA,CAAAC,OAAA,CAA6B,IAAI,CAACH,IAAI,CAACd,KAAK,CAACL,KAAK,CAAC,EAAAD,UAAA,cAA5C,IAAI,CAACT,GAAG,CAACjB,GAAG,CAAC2B,KAAK,CAAC;EAC5B;EAEAE,MAAMA,CAAIlC,CAA4B,EAAEiC,aAAsB;IAC5D,OAAAoB,eAAA,CAAAC,OAAA,CAA4BD,eAAA,CAAAE,OAAA,CAAsBvB,KAAK,IAAK,IAAI,CAACmB,IAAI,CAACd,KAAK,CAACL,KAAK,CAAC,EAAAD,UAAA,cAAtD,IAAI,CAACT,GAAG,CAAClB,GAAG,CAA2C,EAAA2B,UAAA,cAA5E,IAAI,CAACT,GAAG,CAACY,MAAM,CAAClC,CAAC,EAAA+B,UAAA,aAAC;EAC3B","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.make = make;
|
|
7
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/TSemaphore/constructors"));
|
|
8
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/STM/api/atomically"));
|
|
9
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api"));
|
|
10
|
-
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/RefSubject/api"));
|
|
11
|
-
var _RefSubject = /*#__PURE__*/require("@fncts/io/RefSubject");
|
|
12
|
-
var _definition = /*#__PURE__*/require("@fncts/io/RefSubject/Synchronized/definition");
|
|
13
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
-
const fileName_1 = "(@fncts/io) src/RefSubject/Synchronized/api.ts";
|
|
15
|
-
/**
|
|
16
|
-
* @tsplus static fncts.io.Push.RefSubject.SynchronizedOps make
|
|
17
|
-
* @tsplus static fncts.io.Push.RefSubject.SynchronizedOps __call
|
|
18
|
-
*/
|
|
19
|
-
function make(initial) {
|
|
20
|
-
return tsplus_module_3.flatMap(ref => tsplus_module_3.map(semaphore => new _definition.SynchronizedRefSubjectInternal(semaphore, (void 0, ref)), fileName_1 + ":11:24")(tsplus_module_2.atomically(tsplus_module_1.make(1, fileName_1 + ":11:35"), fileName_1 + ":11:38")), fileName_1 + ":10:24")(tsplus_module_4.make(initial));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=api.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.cjs","names":["_RefSubject","require","_definition","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","make","initial","tsplus_module_3","flatMap","ref","map","semaphore","SynchronizedRefSubjectInternal","fileName_1","tsplus_module_2","atomically","tsplus_module_1","tsplus_module_4"],"sources":["../../../_src/RefSubject/Synchronized/api.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;AAAA,IAAAA,WAAA,gBAAAC,OAAA;AACA,IAAAC,WAA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