effect 2.0.0-next.41 → 2.0.0-next.43
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/Bigint/dist/effect-Bigint.cjs.dev.js +365 -28
- package/Bigint/dist/effect-Bigint.cjs.prod.js +365 -28
- package/Boolean/dist/effect-Boolean.cjs.dev.js +243 -22
- package/Boolean/dist/effect-Boolean.cjs.prod.js +243 -22
- package/Brand/dist/effect-Brand.cjs.dev.js +221 -26
- package/Brand/dist/effect-Brand.cjs.prod.js +221 -26
- package/Cache/dist/effect-Cache.cjs.dev.js +182 -77
- package/Cache/dist/effect-Cache.cjs.prod.js +182 -77
- package/Cause/dist/effect-Cause.cjs.dev.js +754 -93
- package/Cause/dist/effect-Cause.cjs.prod.js +754 -93
- package/Channel/dist/effect-Channel.cjs.dev.js +1206 -214
- package/Channel/dist/effect-Channel.cjs.prod.js +1206 -214
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +118 -12
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +118 -12
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +63 -9
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +63 -9
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +107 -12
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +107 -12
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +88 -10
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +88 -10
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +131 -90
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +131 -90
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +88 -10
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +88 -10
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +87 -10
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +87 -10
- package/Chunk/dist/effect-Chunk.cjs.dev.js +1170 -101
- package/Chunk/dist/effect-Chunk.cjs.prod.js +1170 -101
- package/Clock/dist/effect-Clock.cjs.dev.js +121 -50
- package/Clock/dist/effect-Clock.cjs.prod.js +121 -50
- package/Config/dist/effect-Config.cjs.dev.js +386 -71
- package/Config/dist/effect-Config.cjs.prod.js +386 -71
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +219 -40
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +219 -40
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +250 -58
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +250 -58
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +92 -28
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +92 -28
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +85 -28
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +85 -28
- package/Console/dist/effect-Console.cjs.dev.js +316 -106
- package/Console/dist/effect-Console.cjs.prod.js +316 -106
- package/Context/dist/effect-Context.cjs.dev.js +322 -33
- package/Context/dist/effect-Context.cjs.prod.js +322 -33
- package/Data/dist/effect-Data.cjs.dev.js +223 -21
- package/Data/dist/effect-Data.cjs.prod.js +223 -21
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +60 -42
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +60 -42
- package/Deferred/dist/effect-Deferred.cjs.dev.js +254 -55
- package/Deferred/dist/effect-Deferred.cjs.prod.js +254 -55
- package/Differ/dist/effect-Differ.cjs.dev.js +985 -42
- package/Differ/dist/effect-Differ.cjs.prod.js +985 -42
- package/Duration/dist/effect-Duration.cjs.dev.js +476 -51
- package/Duration/dist/effect-Duration.cjs.prod.js +476 -51
- package/Effect/dist/effect-Effect.cjs.dev.js +3485 -411
- package/Effect/dist/effect-Effect.cjs.prod.js +3485 -411
- package/Effectable/dist/effect-Effectable.cjs.dev.js +92 -21
- package/Effectable/dist/effect-Effectable.cjs.prod.js +92 -21
- package/Either/dist/effect-Either.cjs.dev.js +475 -43
- package/Either/dist/effect-Either.cjs.prod.js +475 -43
- package/Encoding/dist/effect-Encoding.cjs.dev.js +302 -29
- package/Encoding/dist/effect-Encoding.cjs.prod.js +302 -29
- package/Equal/dist/effect-Equal.cjs.dev.js +61 -10
- package/Equal/dist/effect-Equal.cjs.prod.js +61 -10
- package/Equivalence/dist/effect-Equivalence.cjs.dev.js +213 -23
- package/Equivalence/dist/effect-Equivalence.cjs.prod.js +213 -23
- package/Error/dist/effect-Error.cjs.dev.js +131 -91
- package/Error/dist/effect-Error.cjs.mjs +1 -1
- package/Error/dist/effect-Error.cjs.prod.js +131 -91
- package/Error/dist/effect-Error.esm.js +2 -2
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.dev.js +2 -2
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.prod.js +2 -2
- package/Exit/dist/effect-Exit.cjs.dev.js +395 -69
- package/Exit/dist/effect-Exit.cjs.prod.js +395 -69
- package/Fiber/dist/effect-Fiber.cjs.dev.js +538 -124
- package/Fiber/dist/effect-Fiber.cjs.prod.js +538 -124
- package/FiberId/dist/effect-FiberId.cjs.dev.js +19 -19
- package/FiberId/dist/effect-FiberId.cjs.prod.js +19 -19
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +401 -121
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +401 -121
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +147 -46
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +147 -46
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +110 -40
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +110 -40
- package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +185 -18
- package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +185 -18
- package/Function/dist/effect-Function.cjs.dev.js +511 -24
- package/Function/dist/effect-Function.cjs.prod.js +511 -24
- package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +18 -3
- package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +18 -3
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +168 -111
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +168 -111
- package/Hash/dist/effect-Hash.cjs.dev.js +175 -19
- package/Hash/dist/effect-Hash.cjs.prod.js +175 -19
- package/HashMap/dist/effect-HashMap.cjs.dev.js +337 -52
- package/HashMap/dist/effect-HashMap.cjs.prod.js +337 -52
- package/HashSet/dist/effect-HashSet.cjs.dev.js +266 -45
- package/HashSet/dist/effect-HashSet.cjs.prod.js +266 -45
- package/Hub/dist/effect-Hub.cjs.dev.js +1320 -89
- package/Hub/dist/effect-Hub.cjs.prod.js +1320 -89
- package/Inspectable/dist/effect-Inspectable.cjs.dev.js +37 -4
- package/Inspectable/dist/effect-Inspectable.cjs.prod.js +37 -4
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +328 -83
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +328 -83
- package/Layer/dist/effect-Layer.cjs.dev.js +697 -147
- package/Layer/dist/effect-Layer.cjs.prod.js +697 -147
- package/List/dist/effect-List.cjs.dev.js +868 -68
- package/List/dist/effect-List.cjs.prod.js +868 -68
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +243 -50
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +243 -50
- package/LogSpan/dist/effect-LogSpan.cjs.dev.js +34 -3
- package/LogSpan/dist/effect-LogSpan.cjs.prod.js +34 -3
- package/Logger/dist/effect-Logger.cjs.dev.js +314 -113
- package/Logger/dist/effect-Logger.cjs.prod.js +314 -113
- package/Metric/dist/effect-Metric.cjs.dev.js +504 -116
- package/Metric/dist/effect-Metric.cjs.prod.js +504 -116
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +72 -26
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +72 -26
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +95 -33
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +95 -33
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +133 -35
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +133 -35
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +179 -38
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +179 -38
- package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +47 -12
- package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +47 -12
- package/MetricPair/dist/effect-MetricPair.cjs.dev.js +38 -6
- package/MetricPair/dist/effect-MetricPair.cjs.prod.js +38 -6
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +230 -86
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +230 -86
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +55 -33
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +55 -33
- package/MetricState/dist/effect-MetricState.cjs.dev.js +174 -29
- package/MetricState/dist/effect-MetricState.cjs.prod.js +174 -29
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +149 -32
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +149 -32
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +111 -30
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +111 -30
- package/MutableList/dist/effect-MutableList.cjs.dev.js +276 -20
- package/MutableList/dist/effect-MutableList.cjs.prod.js +276 -20
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +209 -32
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +209 -32
- package/MutableRef/dist/effect-MutableRef.cjs.dev.js +175 -28
- package/MutableRef/dist/effect-MutableRef.cjs.prod.js +175 -28
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.dev.js +25 -2
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.prod.js +25 -2
- package/Number/dist/effect-Number.cjs.dev.js +389 -29
- package/Number/dist/effect-Number.cjs.prod.js +389 -29
- package/Option/dist/effect-Option.cjs.dev.js +1137 -79
- package/Option/dist/effect-Option.cjs.prod.js +1137 -79
- package/Order/dist/effect-Order.cjs.dev.js +288 -31
- package/Order/dist/effect-Order.cjs.prod.js +288 -31
- package/Ordering/dist/effect-Ordering.cjs.dev.js +89 -7
- package/Ordering/dist/effect-Ordering.cjs.prod.js +89 -7
- package/Pipeable/dist/effect-Pipeable.cjs.dev.js +41 -2
- package/Pipeable/dist/effect-Pipeable.cjs.prod.js +41 -2
- package/Pool/dist/effect-Pool.cjs.dev.js +177 -79
- package/Pool/dist/effect-Pool.cjs.prod.js +177 -79
- package/Predicate/dist/effect-Predicate.cjs.dev.js +672 -44
- package/Predicate/dist/effect-Predicate.cjs.prod.js +672 -44
- package/Queue/dist/effect-Queue.cjs.dev.js +427 -105
- package/Queue/dist/effect-Queue.cjs.prod.js +427 -105
- package/Random/dist/effect-Random.cjs.dev.js +127 -51
- package/Random/dist/effect-Random.cjs.prod.js +127 -51
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +1589 -157
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +1589 -157
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +552 -42
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +552 -42
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +1638 -59
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +1638 -59
- package/Ref/dist/effect-Ref.cjs.dev.js +31 -31
- package/Ref/dist/effect-Ref.cjs.prod.js +31 -31
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +226 -93
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +226 -93
- package/Request/dist/effect-Request.cjs.dev.js +238 -88
- package/Request/dist/effect-Request.cjs.prod.js +238 -88
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +195 -100
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +195 -100
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +292 -110
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +292 -110
- package/Resource/dist/effect-Resource.cjs.dev.js +177 -85
- package/Resource/dist/effect-Resource.cjs.prod.js +177 -85
- package/Runtime/dist/effect-Runtime.cjs.dev.js +245 -94
- package/Runtime/dist/effect-Runtime.cjs.prod.js +245 -94
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +419 -121
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +419 -121
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +25 -25
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +25 -25
- package/STM/dist/effect-STM.cjs.dev.js +1421 -237
- package/STM/dist/effect-STM.cjs.prod.js +1421 -237
- package/Schedule/dist/effect-Schedule.cjs.dev.js +1107 -156
- package/Schedule/dist/effect-Schedule.cjs.prod.js +1107 -156
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +111 -28
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +111 -28
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +237 -33
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +237 -33
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +264 -36
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +264 -36
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +365 -48
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +365 -48
- package/Scope/dist/effect-Scope.cjs.dev.js +192 -82
- package/Scope/dist/effect-Scope.cjs.prod.js +192 -82
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +512 -79
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +512 -79
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +147 -82
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +147 -82
- package/Sink/dist/effect-Sink.cjs.dev.js +1199 -208
- package/Sink/dist/effect-Sink.cjs.prod.js +1199 -208
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +194 -39
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +194 -39
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +293 -42
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +293 -42
- package/Stream/dist/effect-Stream.cjs.dev.js +3273 -401
- package/Stream/dist/effect-Stream.cjs.prod.js +3273 -401
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.dev.js +2 -2
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.prod.js +2 -2
- package/String/dist/effect-String.cjs.dev.js +652 -64
- package/String/dist/effect-String.cjs.prod.js +652 -64
- package/Struct/dist/effect-Struct.cjs.dev.js +126 -9
- package/Struct/dist/effect-Struct.cjs.prod.js +126 -9
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +337 -131
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +337 -131
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +234 -94
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +234 -94
- package/Symbol/dist/effect-Symbol.cjs.dev.js +29 -6
- package/Symbol/dist/effect-Symbol.cjs.prod.js +29 -6
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +254 -102
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +254 -102
- package/TArray/dist/effect-TArray.cjs.dev.js +517 -156
- package/TArray/dist/effect-TArray.cjs.prod.js +517 -156
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +219 -121
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +219 -121
- package/THub/dist/effect-THub.cjs.dev.js +651 -131
- package/THub/dist/effect-THub.cjs.prod.js +651 -131
- package/TMap/dist/effect-TMap.cjs.dev.js +526 -159
- package/TMap/dist/effect-TMap.cjs.prod.js +526 -159
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +459 -133
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +459 -133
- package/TQueue/dist/effect-TQueue.cjs.dev.js +430 -143
- package/TQueue/dist/effect-TQueue.cjs.prod.js +430 -143
- package/TRandom/dist/effect-TRandom.cjs.dev.js +290 -124
- package/TRandom/dist/effect-TRandom.cjs.prod.js +290 -124
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +531 -132
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +531 -132
- package/TRef/dist/effect-TRef.cjs.dev.js +238 -128
- package/TRef/dist/effect-TRef.cjs.prod.js +238 -128
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +283 -127
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +283 -127
- package/TSet/dist/effect-TSet.cjs.dev.js +515 -147
- package/TSet/dist/effect-TSet.cjs.prod.js +515 -147
- package/Take/dist/effect-Take.cjs.dev.js +296 -112
- package/Take/dist/effect-Take.cjs.prod.js +296 -112
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +132 -33
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +132 -33
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +106 -11
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +106 -11
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +128 -62
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +128 -62
- package/TestClock/dist/effect-TestClock.cjs.dev.js +624 -102
- package/TestClock/dist/effect-TestClock.cjs.prod.js +624 -102
- package/TestConfig/dist/effect-TestConfig.cjs.dev.js +41 -20
- package/TestConfig/dist/effect-TestConfig.cjs.prod.js +41 -20
- package/TestContext/dist/effect-TestContext.cjs.dev.js +118 -99
- package/TestContext/dist/effect-TestContext.cjs.prod.js +118 -99
- package/TestLive/dist/effect-TestLive.cjs.dev.js +86 -46
- package/TestLive/dist/effect-TestLive.cjs.prod.js +86 -46
- package/TestServices/dist/effect-TestServices.cjs.dev.js +381 -130
- package/TestServices/dist/effect-TestServices.cjs.prod.js +381 -130
- package/TestSized/dist/effect-TestSized.cjs.dev.js +78 -35
- package/TestSized/dist/effect-TestSized.cjs.prod.js +78 -35
- package/Tracer/dist/effect-Tracer.cjs.dev.js +108 -47
- package/Tracer/dist/effect-Tracer.cjs.prod.js +108 -47
- package/Tuple/dist/effect-Tuple.cjs.dev.js +182 -17
- package/Tuple/dist/effect-Tuple.cjs.prod.js +182 -17
- package/Unify/dist/effect-Unify.cjs.dev.js +37 -3
- package/Unify/dist/effect-Unify.cjs.prod.js +37 -3
- package/Utils/dist/effect-Utils.cjs.dev.js +354 -9
- package/Utils/dist/effect-Utils.cjs.prod.js +354 -9
- package/dist/{Context-f958cabc.cjs.prod.js → Context-01a123ac.cjs.prod.js} +8 -8
- package/dist/{Context-96739709.cjs.dev.js → Context-593661f6.cjs.dev.js} +8 -8
- package/dist/{Effectable-a6403e5f.cjs.dev.js → Effectable-2f022879.cjs.dev.js} +4 -4
- package/dist/{Effectable-f867d1cb.cjs.prod.js → Effectable-cd8f3a96.cjs.prod.js} +4 -4
- package/dist/{Either-9c349424.cjs.dev.js → Either-12bbe00c.cjs.dev.js} +5 -5
- package/dist/{Either-d03d5f05.cjs.prod.js → Either-7a881c7a.cjs.prod.js} +5 -5
- package/dist/{ExecutionStrategy-89fbe735.cjs.dev.js → ExecutionStrategy-14d3053a.cjs.prod.js} +1 -13
- package/dist/{ExecutionStrategy-dc778180.cjs.prod.js → ExecutionStrategy-70f1a920.cjs.dev.js} +1 -13
- package/dist/{FiberId-929dcce4.cjs.dev.js → FiberId-557db880.cjs.dev.js} +8 -30
- package/dist/{FiberId-b79e8047.cjs.prod.js → FiberId-e594f6e8.cjs.prod.js} +8 -30
- package/dist/{HashSet-ece2cfe8.cjs.dev.js → HashSet-0b4ff1e4.cjs.dev.js} +7 -7
- package/dist/{HashSet-6fe62df2.cjs.prod.js → HashSet-6257b66d.cjs.prod.js} +7 -7
- package/dist/{Ref-af783b72.cjs.dev.js → Ref-74b592a4.cjs.dev.js} +5 -25
- package/dist/{Ref-30e5ee58.cjs.prod.js → Ref-a3a4e50d.cjs.prod.js} +5 -25
- package/dist/{RuntimeFlagsPatch-130e990c.cjs.dev.js → RuntimeFlagsPatch-e2769b87.cjs.prod.js} +2 -24
- package/dist/{RuntimeFlagsPatch-5570758d.cjs.prod.js → RuntimeFlagsPatch-ea268c50.cjs.dev.js} +2 -24
- package/dist/{StreamHaltStrategy-66a53f66.cjs.dev.js → StreamHaltStrategy-9a61b88d.cjs.dev.js} +1 -16
- package/dist/{StreamHaltStrategy-07f544a6.cjs.prod.js → StreamHaltStrategy-b495622b.cjs.prod.js} +1 -16
- package/dist/{boundaries-03c7494a.cjs.dev.js → boundaries-20cfad9d.cjs.prod.js} +6 -6
- package/dist/{boundaries-5d1a46e1.cjs.prod.js → boundaries-3810d885.cjs.dev.js} +6 -6
- package/dist/{cache-ab7bbfbd.cjs.prod.js → cache-3a55a13a.cjs.prod.js} +21 -21
- package/dist/{cache-6cdc31f7.cjs.dev.js → cache-83d14f6e.cjs.dev.js} +21 -21
- package/dist/{childExecutorDecision-2b30946c.cjs.prod.js → childExecutorDecision-2eed6e25.cjs.dev.js} +1 -1
- package/dist/{childExecutorDecision-ad3db696.cjs.dev.js → childExecutorDecision-b5842db5.cjs.prod.js} +1 -1
- package/dist/{circular-81e1906f.cjs.dev.js → circular-2162b720.cjs.dev.js} +7 -7
- package/dist/{circular-4cb0b79d.cjs.dev.js → circular-a4887ee9.cjs.dev.js} +19 -19
- package/dist/{circular-6a5291c3.cjs.prod.js → circular-c3ce70f4.cjs.prod.js} +7 -7
- package/dist/{circular-5b3558d9.cjs.prod.js → circular-f72fcb1d.cjs.prod.js} +19 -19
- package/dist/{config-10f2a1d1.cjs.dev.js → config-80900693.cjs.dev.js} +10 -10
- package/dist/{config-78feb1ac.cjs.prod.js → config-d0ddc159.cjs.prod.js} +10 -10
- package/dist/{configError-6a3652f8.cjs.prod.js → configError-240e9b61.cjs.dev.js} +3 -3
- package/dist/{configError-1686533e.cjs.dev.js → configError-33e55472.cjs.prod.js} +3 -3
- package/dist/{configProvider-2b177eac.cjs.prod.js → configProvider-93617d6d.cjs.prod.js} +13 -13
- package/dist/{configProvider-e2eb112d.cjs.dev.js → configProvider-ce43fdbf.cjs.dev.js} +13 -13
- package/dist/{configSecret-ecb6c5b3.cjs.prod.js → configSecret-d1caca55.cjs.prod.js} +4 -4
- package/dist/{configSecret-5812fa69.cjs.dev.js → configSecret-e34c1b14.cjs.dev.js} +4 -4
- package/dist/{core-c2eb171a.cjs.prod.js → core-0b0539de.cjs.prod.js} +24 -24
- package/dist/{core-bce61cfc.cjs.prod.js → core-8ff5a82c.cjs.prod.js} +14 -14
- package/dist/{core-898decb7.cjs.dev.js → core-b2dfee8d.cjs.dev.js} +14 -14
- package/dist/{core-ac668be0.cjs.dev.js → core-b4d7b4f5.cjs.dev.js} +24 -24
- package/dist/{core-effect-a9b8ee08.cjs.dev.js → core-effect-892f3686.cjs.dev.js} +23 -23
- package/dist/{core-effect-bf806dd9.cjs.prod.js → core-effect-c65770cd.cjs.prod.js} +23 -23
- package/dist/{dataSource-31698050.cjs.dev.js → dataSource-5227437c.cjs.dev.js} +7 -7
- package/dist/{dataSource-77d1e579.cjs.prod.js → dataSource-837686e6.cjs.prod.js} +7 -7
- package/dist/declarations/src/Data.d.ts +2 -2
- package/dist/declarations/src/Error.d.ts +1 -1
- package/dist/declarations/src/Error.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/{defaultServices-60c753dc.cjs.dev.js → defaultServices-086b8ac9.cjs.prod.js} +13 -13
- package/dist/{defaultServices-4112c0c9.cjs.prod.js → defaultServices-5530ff0e.cjs.dev.js} +13 -13
- package/dist/effect.cjs.dev.js +466 -344
- package/dist/effect.cjs.prod.js +466 -344
- package/dist/effect.esm.js +283 -283
- package/dist/{fiber-da1a207c.cjs.dev.js → fiber-1bfb4c1d.cjs.dev.js} +14 -14
- package/dist/{fiber-90ffaf8c.cjs.prod.js → fiber-2eb0a4c1.cjs.prod.js} +14 -14
- package/dist/{fiberRefs-64c35250.cjs.prod.js → fiberRefs-be4fae6a.cjs.dev.js} +7 -7
- package/dist/{fiberRefs-a7e00f7e.cjs.dev.js → fiberRefs-be6b6a70.cjs.prod.js} +7 -7
- package/dist/{fiberRuntime-1c369a47.cjs.prod.js → fiberRuntime-af2d0ca1.cjs.prod.js} +47 -47
- package/dist/{fiberRuntime-e9680313.cjs.dev.js → fiberRuntime-e0db0ab6.cjs.dev.js} +47 -47
- package/dist/{groupBy-aa608972.cjs.prod.js → groupBy-7ce46ea3.cjs.prod.js} +14 -14
- package/dist/{groupBy-fa001ed8.cjs.dev.js → groupBy-bd943372.cjs.dev.js} +14 -14
- package/dist/{hook-822704ea.cjs.dev.js → hook-470b717e.cjs.prod.js} +9 -9
- package/dist/{hook-6c7550dc.cjs.prod.js → hook-e72b20fd.cjs.dev.js} +9 -9
- package/dist/{key-330b98b1.cjs.prod.js → key-378a6a2c.cjs.prod.js} +8 -8
- package/dist/{key-a474fc0d.cjs.dev.js → key-f0a1408a.cjs.dev.js} +8 -8
- package/dist/{keyType-1e916ae2.cjs.dev.js → keyType-55f27f07.cjs.dev.js} +5 -5
- package/dist/{keyType-8460e792.cjs.prod.js → keyType-cf67c69c.cjs.prod.js} +5 -5
- package/dist/{label-3e143765.cjs.prod.js → label-011edbe7.cjs.dev.js} +4 -4
- package/dist/{label-246fb11d.cjs.dev.js → label-655343b5.cjs.prod.js} +4 -4
- package/dist/{layer-6f71c525.cjs.prod.js → layer-3b1b0e2e.cjs.prod.js} +19 -19
- package/dist/{layer-7991a9d1.cjs.dev.js → layer-9cbb61ce.cjs.dev.js} +19 -19
- package/dist/{mergeDecision-e483c280.cjs.prod.js → mergeDecision-07c6b5c9.cjs.prod.js} +1 -1
- package/dist/{mergeDecision-e457a76b.cjs.dev.js → mergeDecision-be41e797.cjs.dev.js} +1 -1
- package/dist/{mergeState-dba66248.cjs.prod.js → mergeState-75990fa2.cjs.prod.js} +1 -1
- package/dist/{mergeState-83204f38.cjs.dev.js → mergeState-8153ce39.cjs.dev.js} +1 -1
- package/dist/{mergeStrategy-845a1279.cjs.prod.js → mergeStrategy-3dd6e55f.cjs.prod.js} +1 -1
- package/dist/{mergeStrategy-b19dc19a.cjs.dev.js → mergeStrategy-81ea5b80.cjs.dev.js} +1 -1
- package/dist/{pair-e5443c93.cjs.prod.js → pair-291b78d7.cjs.dev.js} +1 -1
- package/dist/{pair-08a8685e.cjs.dev.js → pair-6254cf85.cjs.prod.js} +1 -1
- package/dist/{patch-4671ab7f.cjs.dev.js → patch-a1b2802f.cjs.dev.js} +4 -4
- package/dist/{patch-f27e9f08.cjs.prod.js → patch-c4d6c61e.cjs.prod.js} +4 -4
- package/dist/{pathPatch-e46d4168.cjs.dev.js → pathPatch-15c8d723.cjs.prod.js} +6 -6
- package/dist/{pathPatch-ded405f6.cjs.prod.js → pathPatch-d9d41297.cjs.dev.js} +6 -6
- package/dist/{pool-3f16af61.cjs.dev.js → pool-29b03fb2.cjs.dev.js} +12 -12
- package/dist/{pool-59a31f55.cjs.prod.js → pool-b5c7d254.cjs.prod.js} +12 -12
- package/dist/{query-193d0a89.cjs.dev.js → query-67a7c448.cjs.dev.js} +6 -6
- package/dist/{query-fe4a82d6.cjs.prod.js → query-d5eefc43.cjs.prod.js} +6 -6
- package/dist/{queue-b81aee38.cjs.prod.js → queue-38614769.cjs.prod.js} +9 -9
- package/dist/{queue-04ae7ec7.cjs.dev.js → queue-997d6e51.cjs.dev.js} +9 -9
- package/dist/{registry-29905dcc.cjs.prod.js → registry-013ecdde.cjs.prod.js} +7 -7
- package/dist/{registry-c883cf52.cjs.dev.js → registry-1099de3f.cjs.dev.js} +7 -7
- package/dist/{runtime-3ae98f19.cjs.dev.js → runtime-15cc9cc5.cjs.dev.js} +18 -16
- package/dist/{runtime-8c3f1bd3.cjs.prod.js → runtime-3a59f5c4.cjs.prod.js} +18 -16
- package/dist/{schedule-7e30db2d.cjs.prod.js → schedule-1d92198c.cjs.prod.js} +22 -22
- package/dist/{schedule-479d8fcc.cjs.dev.js → schedule-e0f55cab.cjs.dev.js} +22 -22
- package/dist/{scopedRef-16d9d192.cjs.dev.js → scopedRef-88ae648a.cjs.dev.js} +9 -9
- package/dist/{scopedRef-40b5bb82.cjs.prod.js → scopedRef-a0257d92.cjs.prod.js} +9 -9
- package/dist/{singleProducerAsyncInput-24ccc472.cjs.prod.js → singleProducerAsyncInput-1c6cc8fb.cjs.prod.js} +13 -13
- package/dist/{singleProducerAsyncInput-18fc5896.cjs.dev.js → singleProducerAsyncInput-998b8fac.cjs.dev.js} +13 -13
- package/dist/{sink-3a597454.cjs.dev.js → sink-1ac24bca.cjs.dev.js} +42 -42
- package/dist/{sink-1f4c02bb.cjs.prod.js → sink-4d668efb.cjs.prod.js} +42 -42
- package/dist/{state-0d29362f.cjs.prod.js → state-8fbec044.cjs.dev.js} +4 -4
- package/dist/{state-8a8a647c.cjs.dev.js → state-dd1bd066.cjs.prod.js} +4 -4
- package/dist/{stm-789f4457.cjs.dev.js → stm-fbb398a5.cjs.dev.js} +13 -13
- package/dist/{stm-8e837f76.cjs.prod.js → stm-fcac86d5.cjs.prod.js} +13 -13
- package/dist/{stream-42bee6fa.cjs.dev.js → stream-adef675d.cjs.dev.js} +33 -33
- package/dist/{stream-71fa9ae8.cjs.prod.js → stream-e670e8fa.cjs.prod.js} +33 -33
- package/dist/{synchronizedRef-58a64ffe.cjs.dev.js → synchronizedRef-37e32854.cjs.dev.js} +3 -3
- package/dist/{synchronizedRef-6cfe9354.cjs.prod.js → synchronizedRef-b4cde4de.cjs.prod.js} +3 -3
- package/dist/{tArray-b96cf402.cjs.prod.js → tArray-239d37ad.cjs.dev.js} +7 -7
- package/dist/{tArray-56df545e.cjs.dev.js → tArray-70de8ec4.cjs.prod.js} +7 -7
- package/dist/{tMap-1103e942.cjs.dev.js → tMap-4b27665d.cjs.dev.js} +12 -12
- package/dist/{tMap-3ed5a386.cjs.prod.js → tMap-a202396b.cjs.prod.js} +12 -12
- package/dist/{tQueue-4d90a114.cjs.dev.js → tQueue-004a478e.cjs.dev.js} +8 -8
- package/dist/{tQueue-9c69c6b3.cjs.prod.js → tQueue-82c4db95.cjs.prod.js} +8 -8
- package/dist/{tRef-5c469ca5.cjs.dev.js → tRef-bb7cc73a.cjs.dev.js} +3 -3
- package/dist/{tRef-68a9114f.cjs.prod.js → tRef-ee2c7f44.cjs.prod.js} +3 -3
- package/dist/{take-85954a45.cjs.prod.js → take-4857b6af.cjs.dev.js} +7 -7
- package/dist/{take-84a0722c.cjs.dev.js → take-9c555b46.cjs.prod.js} +7 -7
- package/dist/{timeout-2a62e4b5.cjs.prod.js → timeout-489f3f86.cjs.prod.js} +2 -2
- package/dist/{timeout-0245c158.cjs.dev.js → timeout-d380d3f8.cjs.dev.js} +2 -2
- package/dist/{upstreamPullRequest-705e868d.cjs.prod.js → upstreamPullRequest-7a694281.cjs.dev.js} +1 -1
- package/dist/{upstreamPullRequest-c08f06a4.cjs.dev.js → upstreamPullRequest-c89f818d.cjs.prod.js} +1 -1
- package/dist/{upstreamPullStrategy-34452db1.cjs.prod.js → upstreamPullStrategy-63cc8967.cjs.prod.js} +1 -1
- package/dist/{upstreamPullStrategy-0ccf2960.cjs.dev.js → upstreamPullStrategy-f9f1ab57.cjs.dev.js} +1 -1
- package/internal/core.esm.js +5 -5
- package/internal/defaultServices/console.esm.js +1 -1
- package/internal/defaultServices.esm.js +2 -1
- package/internal/fiberRuntime.esm.js +7 -7
- package/internal/logger.esm.js +3 -3
- package/internal/runtime.esm.js +2 -0
- package/internal/supervisor.esm.js +2 -1
- package/internal/timeout.esm.js +2 -2
- package/package.json +3 -2
- package/dist/Bigint-0ebd807c.cjs.dev.js +0 -392
- package/dist/Bigint-912c77f3.cjs.prod.js +0 -392
- package/dist/Boolean-97839b78.cjs.prod.js +0 -264
- package/dist/Boolean-f0bc3abf.cjs.dev.js +0 -264
- package/dist/Brand-93578f43.cjs.prod.js +0 -224
- package/dist/Brand-b238487d.cjs.dev.js +0 -224
- package/dist/Cache-1688e584.cjs.dev.js +0 -127
- package/dist/Cache-8f2f2b55.cjs.prod.js +0 -127
- package/dist/Cause-384e2165.cjs.prod.js +0 -791
- package/dist/Cause-96c29074.cjs.dev.js +0 -791
- package/dist/Channel-0701d2dd.cjs.dev.js +0 -1217
- package/dist/Channel-7aed463e.cjs.prod.js +0 -1217
- package/dist/ChannelChildExecutorDecision-168278f6.cjs.prod.js +0 -136
- package/dist/ChannelChildExecutorDecision-b0e715de.cjs.dev.js +0 -136
- package/dist/ChannelMergeDecision-9c266aeb.cjs.prod.js +0 -78
- package/dist/ChannelMergeDecision-eeaf4779.cjs.dev.js +0 -78
- package/dist/ChannelMergeState-4366d090.cjs.prod.js +0 -125
- package/dist/ChannelMergeState-abce1d88.cjs.dev.js +0 -125
- package/dist/ChannelMergeStrategy-6193b8e0.cjs.prod.js +0 -104
- package/dist/ChannelMergeStrategy-e7ddbb7a.cjs.dev.js +0 -104
- package/dist/ChannelSingleProducerAsyncInput-46c393db.cjs.dev.js +0 -55
- package/dist/ChannelSingleProducerAsyncInput-7eb9d2ae.cjs.prod.js +0 -55
- package/dist/ChannelUpstreamPullRequest-1ca7d2bd.cjs.dev.js +0 -104
- package/dist/ChannelUpstreamPullRequest-208751c3.cjs.prod.js +0 -104
- package/dist/ChannelUpstreamPullStrategy-266b5a77.cjs.prod.js +0 -103
- package/dist/ChannelUpstreamPullStrategy-ec57dc70.cjs.dev.js +0 -103
- package/dist/Chunk-6cf5a8e6.cjs.prod.js +0 -1248
- package/dist/Chunk-bd290b8e.cjs.dev.js +0 -1248
- package/dist/Clock-09ecce0a.cjs.prod.js +0 -97
- package/dist/Clock-bec722c1.cjs.dev.js +0 -97
- package/dist/Config-85ae6286.cjs.prod.js +0 -393
- package/dist/Config-dc58cf69.cjs.dev.js +0 -393
- package/dist/ConfigError-c1f762d2.cjs.dev.js +0 -225
- package/dist/ConfigError-cee682fa.cjs.prod.js +0 -225
- package/dist/ConfigProvider-8341a5f5.cjs.prod.js +0 -240
- package/dist/ConfigProvider-de45b085.cjs.dev.js +0 -240
- package/dist/ConfigProviderPathPatch-52422b32.cjs.prod.js +0 -86
- package/dist/ConfigProviderPathPatch-d22442e3.cjs.dev.js +0 -86
- package/dist/ConfigSecret-c76717e8.cjs.dev.js +0 -83
- package/dist/ConfigSecret-ebab2ae7.cjs.prod.js +0 -83
- package/dist/Console-63eebbd5.cjs.prod.js +0 -271
- package/dist/Console-a1c2c16f.cjs.dev.js +0 -271
- package/dist/Context-25a49952.cjs.prod.js +0 -327
- package/dist/Context-3c9e986b.cjs.dev.js +0 -327
- package/dist/Data-07dc27f1.cjs.prod.js +0 -237
- package/dist/Data-85559fb3.cjs.dev.js +0 -237
- package/dist/DefaultServices-d5740d37.cjs.dev.js +0 -34
- package/dist/DefaultServices-df7495bb.cjs.prod.js +0 -34
- package/dist/Deferred-5d5c886c.cjs.dev.js +0 -253
- package/dist/Deferred-9d825b3b.cjs.prod.js +0 -253
- package/dist/Differ-0122f60e.cjs.dev.js +0 -992
- package/dist/Differ-0bd34066.cjs.prod.js +0 -992
- package/dist/Duration-0bc08d03.cjs.prod.js +0 -508
- package/dist/Duration-604874d1.cjs.dev.js +0 -508
- package/dist/Effect-4de56bb2.cjs.prod.js +0 -3740
- package/dist/Effect-cf226187.cjs.dev.js +0 -3740
- package/dist/Effectable-04f3cd30.cjs.dev.js +0 -99
- package/dist/Effectable-8997112d.cjs.prod.js +0 -99
- package/dist/Either-3fab3796.cjs.prod.js +0 -502
- package/dist/Either-a806809d.cjs.dev.js +0 -502
- package/dist/Encoding-0cab52d5.cjs.prod.js +0 -309
- package/dist/Encoding-d993b1b0.cjs.dev.js +0 -309
- package/dist/Equal-281b6ca8.cjs.dev.js +0 -71
- package/dist/Equal-ce9977a8.cjs.prod.js +0 -71
- package/dist/Equivalence-0bc84518.cjs.prod.js +0 -238
- package/dist/Equivalence-de7a0d51.cjs.dev.js +0 -238
- package/dist/Error-05f55a51.cjs.prod.js +0 -57
- package/dist/Error-469a9429.cjs.dev.js +0 -57
- package/dist/Exit-5691142c.cjs.prod.js +0 -408
- package/dist/Exit-a23874e1.cjs.dev.js +0 -408
- package/dist/Fiber-6432d5f7.cjs.dev.js +0 -521
- package/dist/Fiber-e61b3c65.cjs.prod.js +0 -521
- package/dist/FiberRef-1db44a9b.cjs.dev.js +0 -385
- package/dist/FiberRef-efb4a3ac.cjs.prod.js +0 -385
- package/dist/FiberRefs-43bfd8b9.cjs.dev.js +0 -135
- package/dist/FiberRefs-4cb171f7.cjs.prod.js +0 -135
- package/dist/FiberRefsPatch-5236f61e.cjs.dev.js +0 -90
- package/dist/FiberRefsPatch-cb847553.cjs.prod.js +0 -90
- package/dist/FiberStatus-b82dad24.cjs.prod.js +0 -197
- package/dist/FiberStatus-bac7d58d.cjs.dev.js +0 -197
- package/dist/Function-2e6b0cda.cjs.prod.js +0 -538
- package/dist/Function-41ce433d.cjs.dev.js +0 -538
- package/dist/GlobalValue-81ab6908.cjs.dev.js +0 -28
- package/dist/GlobalValue-cb645c99.cjs.prod.js +0 -28
- package/dist/GroupBy-2d7ec675.cjs.dev.js +0 -79
- package/dist/GroupBy-cf6e72eb.cjs.prod.js +0 -79
- package/dist/HKT-2cc79e63.cjs.dev.js +0 -7
- package/dist/HKT-d682535d.cjs.prod.js +0 -7
- package/dist/Hash-1bd73210.cjs.prod.js +0 -192
- package/dist/Hash-bd154268.cjs.dev.js +0 -192
- package/dist/HashMap-12668911.cjs.prod.js +0 -361
- package/dist/HashMap-68e290b6.cjs.dev.js +0 -361
- package/dist/HashSet-6978c08e.cjs.dev.js +0 -283
- package/dist/HashSet-c40a52b1.cjs.prod.js +0 -283
- package/dist/Hub-6e64debd.cjs.prod.js +0 -1280
- package/dist/Hub-74834668.cjs.dev.js +0 -1280
- package/dist/Inspectable-3c4a0f5d.cjs.prod.js +0 -50
- package/dist/Inspectable-ac929af4.cjs.dev.js +0 -50
- package/dist/KeyedPool-b05481e9.cjs.dev.js +0 -282
- package/dist/KeyedPool-cd8abf95.cjs.prod.js +0 -282
- package/dist/Layer-b05441ff.cjs.dev.js +0 -688
- package/dist/Layer-b1461d01.cjs.prod.js +0 -688
- package/dist/List-c6ea7efe.cjs.dev.js +0 -912
- package/dist/List-d9775087.cjs.prod.js +0 -912
- package/dist/LogLevel-99f64f82.cjs.dev.js +0 -240
- package/dist/LogLevel-e9848e15.cjs.prod.js +0 -240
- package/dist/LogSpan-c905a192.cjs.prod.js +0 -46
- package/dist/LogSpan-e345ba58.cjs.dev.js +0 -46
- package/dist/Logger-72da8fab.cjs.dev.js +0 -275
- package/dist/Logger-ea8c75a9.cjs.prod.js +0 -275
- package/dist/Metric-09d012ff.cjs.dev.js +0 -488
- package/dist/Metric-b7563a68.cjs.prod.js +0 -488
- package/dist/MetricBoundaries-cf5df220.cjs.prod.js +0 -68
- package/dist/MetricBoundaries-f5f5aae1.cjs.dev.js +0 -68
- package/dist/MetricHook-3104e93b.cjs.dev.js +0 -90
- package/dist/MetricHook-efd05d72.cjs.prod.js +0 -90
- package/dist/MetricKey-9cfcaec8.cjs.prod.js +0 -130
- package/dist/MetricKey-c3ba437e.cjs.dev.js +0 -130
- package/dist/MetricKeyType-6d2d9036.cjs.prod.js +0 -187
- package/dist/MetricKeyType-c1d7ebe8.cjs.dev.js +0 -187
- package/dist/MetricLabel-6a1886c6.cjs.dev.js +0 -53
- package/dist/MetricLabel-7e1d569e.cjs.prod.js +0 -53
- package/dist/MetricPair-658ab13d.cjs.dev.js +0 -50
- package/dist/MetricPair-aec13967.cjs.prod.js +0 -50
- package/dist/MetricPolling-5af0ff67.cjs.dev.js +0 -177
- package/dist/MetricPolling-a0a4e798.cjs.prod.js +0 -177
- package/dist/MetricRegistry-e4af936b.cjs.dev.js +0 -38
- package/dist/MetricRegistry-ff6df283.cjs.prod.js +0 -38
- package/dist/MetricState-b65340a4.cjs.dev.js +0 -191
- package/dist/MetricState-bd6a5001.cjs.prod.js +0 -191
- package/dist/MutableHashMap-74e83e84.cjs.dev.js +0 -154
- package/dist/MutableHashMap-95493edb.cjs.prod.js +0 -154
- package/dist/MutableHashSet-780dfd63.cjs.prod.js +0 -110
- package/dist/MutableHashSet-ec8d7cc4.cjs.dev.js +0 -110
- package/dist/MutableList-58124ef2.cjs.dev.js +0 -296
- package/dist/MutableList-732af09a.cjs.prod.js +0 -296
- package/dist/MutableQueue-0e9f2466.cjs.dev.js +0 -215
- package/dist/MutableQueue-f8aba856.cjs.prod.js +0 -215
- package/dist/MutableRef-4a2f1f23.cjs.prod.js +0 -194
- package/dist/MutableRef-724c4082.cjs.dev.js +0 -194
- package/dist/NonEmptyIterable-418cef14.cjs.prod.js +0 -36
- package/dist/NonEmptyIterable-bb452f41.cjs.dev.js +0 -36
- package/dist/Number-588f6483.cjs.dev.js +0 -417
- package/dist/Number-cb2ba2e8.cjs.prod.js +0 -417
- package/dist/Option-02025c86.cjs.prod.js +0 -1198
- package/dist/Option-03997d77.cjs.dev.js +0 -1198
- package/dist/Order-28bdebd2.cjs.dev.js +0 -321
- package/dist/Order-8a112bfb.cjs.prod.js +0 -321
- package/dist/Ordering-60bf9127.cjs.prod.js +0 -104
- package/dist/Ordering-b955b746.cjs.dev.js +0 -104
- package/dist/Pipeable-4698db72.cjs.dev.js +0 -52
- package/dist/Pipeable-d3ec6711.cjs.prod.js +0 -52
- package/dist/Pool-54389592.cjs.prod.js +0 -122
- package/dist/Pool-fe1b506a.cjs.dev.js +0 -122
- package/dist/Predicate-9e859c9c.cjs.dev.js +0 -718
- package/dist/Predicate-daa86e61.cjs.prod.js +0 -718
- package/dist/Queue-5f954287.cjs.prod.js +0 -394
- package/dist/Queue-8d082fe4.cjs.dev.js +0 -394
- package/dist/Random-35304046.cjs.dev.js +0 -104
- package/dist/Random-b4709b6a.cjs.prod.js +0 -104
- package/dist/ReadonlyArray-48949ee7.cjs.dev.js +0 -1721
- package/dist/ReadonlyArray-8157f697.cjs.prod.js +0 -1721
- package/dist/ReadonlyRecord-605a625b.cjs.dev.js +0 -568
- package/dist/ReadonlyRecord-8db8bada.cjs.prod.js +0 -568
- package/dist/RedBlackTree-e6bd147c.cjs.dev.js +0 -1669
- package/dist/RedBlackTree-eb41ea8a.cjs.prod.js +0 -1669
- package/dist/Reloadable-97b2e406.cjs.dev.js +0 -169
- package/dist/Reloadable-d1cd2c7d.cjs.prod.js +0 -169
- package/dist/Request-53592fe4.cjs.prod.js +0 -190
- package/dist/Request-d3b63af6.cjs.dev.js +0 -190
- package/dist/RequestBlock-5062df49.cjs.dev.js +0 -124
- package/dist/RequestBlock-8552671f.cjs.prod.js +0 -124
- package/dist/RequestResolver-3a24e033.cjs.prod.js +0 -233
- package/dist/RequestResolver-7fcb89fb.cjs.dev.js +0 -233
- package/dist/Resource-2530fe45.cjs.prod.js +0 -118
- package/dist/Resource-e50b4b25.cjs.dev.js +0 -118
- package/dist/Runtime-0d643f0c.cjs.prod.js +0 -191
- package/dist/Runtime-c4b887ff.cjs.dev.js +0 -191
- package/dist/RuntimeFlags-128b287a.cjs.dev.js +0 -381
- package/dist/RuntimeFlags-f50d0c72.cjs.prod.js +0 -381
- package/dist/STM-243df414.cjs.prod.js +0 -1447
- package/dist/STM-2b6ea69d.cjs.dev.js +0 -1447
- package/dist/Schedule-0444792d.cjs.prod.js +0 -1159
- package/dist/Schedule-b6c7b49a.cjs.dev.js +0 -1159
- package/dist/ScheduleDecision-369f2d2b.cjs.prod.js +0 -106
- package/dist/ScheduleDecision-ba8d0e87.cjs.dev.js +0 -106
- package/dist/ScheduleInterval-51f42533.cjs.dev.js +0 -244
- package/dist/ScheduleInterval-78037484.cjs.prod.js +0 -244
- package/dist/ScheduleIntervals-b0bfcf3b.cjs.dev.js +0 -265
- package/dist/ScheduleIntervals-db13140c.cjs.prod.js +0 -265
- package/dist/Scheduler-819ee02a.cjs.prod.js +0 -358
- package/dist/Scheduler-d080442d.cjs.dev.js +0 -358
- package/dist/Scope-311c7eb9.cjs.prod.js +0 -143
- package/dist/Scope-6ba9ec6d.cjs.dev.js +0 -143
- package/dist/ScopedCache-3f58b125.cjs.dev.js +0 -467
- package/dist/ScopedCache-8f99505c.cjs.prod.js +0 -467
- package/dist/ScopedRef-7946d287.cjs.prod.js +0 -87
- package/dist/ScopedRef-b92e1633.cjs.dev.js +0 -87
- package/dist/Sink-175252a1.cjs.dev.js +0 -1215
- package/dist/Sink-85c6820f.cjs.prod.js +0 -1215
- package/dist/SortedMap-bb3311c3.cjs.prod.js +0 -210
- package/dist/SortedMap-f452cc44.cjs.dev.js +0 -210
- package/dist/SortedSet-424670fe.cjs.prod.js +0 -311
- package/dist/SortedSet-f90b14a2.cjs.dev.js +0 -311
- package/dist/Stream-31c121b4.cjs.prod.js +0 -3469
- package/dist/Stream-f833c9da.cjs.dev.js +0 -3469
- package/dist/StreamEmit-a10e1de5.cjs.prod.js +0 -7
- package/dist/StreamEmit-ec1da471.cjs.dev.js +0 -7
- package/dist/String-23b18ca9.cjs.prod.js +0 -694
- package/dist/String-830aaa3e.cjs.dev.js +0 -694
- package/dist/Struct-14648d76.cjs.dev.js +0 -141
- package/dist/Struct-c6b00f29.cjs.prod.js +0 -141
- package/dist/SubscriptionRef-10afb90a.cjs.prod.js +0 -269
- package/dist/SubscriptionRef-8870f37c.cjs.dev.js +0 -269
- package/dist/Supervisor-0b397027.cjs.dev.js +0 -170
- package/dist/Supervisor-18f2ef4e.cjs.prod.js +0 -170
- package/dist/Symbol-55d0b3d8.cjs.prod.js +0 -40
- package/dist/Symbol-5d74a5f2.cjs.dev.js +0 -40
- package/dist/SynchronizedRef-3181eb0a.cjs.dev.js +0 -212
- package/dist/SynchronizedRef-c6e0884b.cjs.prod.js +0 -212
- package/dist/TArray-13d02e45.cjs.prod.js +0 -455
- package/dist/TArray-d244048f.cjs.dev.js +0 -455
- package/dist/TDeferred-66f69724.cjs.prod.js +0 -129
- package/dist/TDeferred-6b7151e4.cjs.dev.js +0 -129
- package/dist/THub-4f3308b5.cjs.dev.js +0 -570
- package/dist/THub-70471c3e.cjs.prod.js +0 -570
- package/dist/TMap-6ec29b88.cjs.prod.js +0 -463
- package/dist/TMap-d28007c5.cjs.dev.js +0 -463
- package/dist/TPriorityQueue-76d9fb5a.cjs.prod.js +0 -381
- package/dist/TPriorityQueue-b2370942.cjs.dev.js +0 -381
- package/dist/TQueue-d66ff462.cjs.dev.js +0 -353
- package/dist/TQueue-defe6f54.cjs.prod.js +0 -353
- package/dist/TRandom-2d293b98.cjs.prod.js +0 -203
- package/dist/TRandom-f6a907b8.cjs.dev.js +0 -203
- package/dist/TReentrantLock-81ebe2df.cjs.prod.js +0 -456
- package/dist/TReentrantLock-eed7de13.cjs.dev.js +0 -456
- package/dist/TRef-ad753da1.cjs.dev.js +0 -152
- package/dist/TRef-f8453998.cjs.prod.js +0 -152
- package/dist/TSemaphore-26326b8a.cjs.dev.js +0 -197
- package/dist/TSemaphore-de7a42e6.cjs.prod.js +0 -197
- package/dist/TSet-eb8e6abb.cjs.prod.js +0 -444
- package/dist/TSet-f5f2a16b.cjs.dev.js +0 -444
- package/dist/Take-7eae9eb6.cjs.dev.js +0 -236
- package/dist/Take-bf728196.cjs.prod.js +0 -236
- package/dist/TestAnnotation-73be7a68.cjs.dev.js +0 -135
- package/dist/TestAnnotation-b9b93d03.cjs.prod.js +0 -135
- package/dist/TestAnnotationMap-80c87410.cjs.dev.js +0 -125
- package/dist/TestAnnotationMap-e946bab5.cjs.prod.js +0 -125
- package/dist/TestAnnotations-5db95828.cjs.prod.js +0 -97
- package/dist/TestAnnotations-733b39ef.cjs.dev.js +0 -97
- package/dist/TestClock-7b24411c.cjs.dev.js +0 -581
- package/dist/TestClock-93cdaabb.cjs.prod.js +0 -581
- package/dist/TestConfig-1a73e844.cjs.prod.js +0 -37
- package/dist/TestConfig-e5ffa946.cjs.dev.js +0 -37
- package/dist/TestContext-eeb935e5.cjs.dev.js +0 -41
- package/dist/TestContext-fe76c79a.cjs.prod.js +0 -41
- package/dist/TestLive-465ad3ef.cjs.dev.js +0 -60
- package/dist/TestLive-f3232ac4.cjs.prod.js +0 -60
- package/dist/TestServices-217f5abb.cjs.dev.js +0 -341
- package/dist/TestServices-3e29bef4.cjs.prod.js +0 -341
- package/dist/TestSized-6c1abc21.cjs.dev.js +0 -64
- package/dist/TestSized-a9a87d64.cjs.prod.js +0 -64
- package/dist/Tracer-d06d0b61.cjs.prod.js +0 -81
- package/dist/Tracer-da182c8c.cjs.dev.js +0 -81
- package/dist/Tuple-27ecf3a1.cjs.prod.js +0 -199
- package/dist/Tuple-75d2a389.cjs.dev.js +0 -199
- package/dist/Types-1280d3aa.cjs.dev.js +0 -7
- package/dist/Types-3a58df45.cjs.prod.js +0 -7
- package/dist/Unify-99be0499.cjs.dev.js +0 -48
- package/dist/Unify-e86fd412.cjs.prod.js +0 -48
- package/dist/Utils-864e1d48.cjs.prod.js +0 -370
- package/dist/Utils-b0c14d1b.cjs.dev.js +0 -370
|
@@ -2,94 +2,1325 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../dist/
|
|
7
|
-
require('../../dist/
|
|
8
|
-
require('../../dist/
|
|
9
|
-
require('../../dist/
|
|
10
|
-
require('../../dist/
|
|
11
|
-
require('../../dist/
|
|
12
|
-
require('../../dist/
|
|
13
|
-
require('../../dist/
|
|
14
|
-
require('../../dist/
|
|
15
|
-
require('../../dist/
|
|
16
|
-
require('../../dist/
|
|
17
|
-
require('../../dist/
|
|
18
|
-
require('../../dist/
|
|
19
|
-
require('../../dist/
|
|
20
|
-
require('../../dist/
|
|
21
|
-
require('../../dist/
|
|
22
|
-
require('../../dist/
|
|
23
|
-
require('../../dist/
|
|
5
|
+
var Chunk_dist_effectChunk = require('../../Chunk/dist/effect-Chunk.cjs.dev.js');
|
|
6
|
+
var Function_dist_effectFunction = require('../../Function/dist/effect-Function.cjs.dev.js');
|
|
7
|
+
var core = require('../../dist/core-b4d7b4f5.cjs.dev.js');
|
|
8
|
+
var ExecutionStrategy_dist_effectExecutionStrategy = require('../../dist/ExecutionStrategy-70f1a920.cjs.dev.js');
|
|
9
|
+
var fiberRuntime = require('../../dist/fiberRuntime-e0db0ab6.cjs.dev.js');
|
|
10
|
+
var queue = require('../../dist/queue-997d6e51.cjs.dev.js');
|
|
11
|
+
var MutableQueue_dist_effectMutableQueue = require('../../MutableQueue/dist/effect-MutableQueue.cjs.dev.js');
|
|
12
|
+
var MutableRef_dist_effectMutableRef = require('../../MutableRef/dist/effect-MutableRef.cjs.dev.js');
|
|
13
|
+
var Option_dist_effectOption = require('../../Option/dist/effect-Option.cjs.dev.js');
|
|
14
|
+
var Pipeable_dist_effectPipeable = require('../../Pipeable/dist/effect-Pipeable.cjs.dev.js');
|
|
15
|
+
require('../../Equal/dist/effect-Equal.cjs.dev.js');
|
|
16
|
+
require('../../Hash/dist/effect-Hash.cjs.dev.js');
|
|
17
|
+
require('../../GlobalValue/dist/effect-GlobalValue.cjs.dev.js');
|
|
18
|
+
require('../../Utils/dist/effect-Utils.cjs.dev.js');
|
|
19
|
+
require('../../Predicate/dist/effect-Predicate.cjs.dev.js');
|
|
20
|
+
require('../../Equivalence/dist/effect-Equivalence.cjs.dev.js');
|
|
21
|
+
require('../../Inspectable/dist/effect-Inspectable.cjs.dev.js');
|
|
22
|
+
require('../../Order/dist/effect-Order.cjs.dev.js');
|
|
23
|
+
require('../../ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js');
|
|
24
|
+
require('../../Either/dist/effect-Either.cjs.dev.js');
|
|
25
|
+
require('../../dist/Either-12bbe00c.cjs.dev.js');
|
|
26
|
+
require('../../dist/Effectable-2f022879.cjs.dev.js');
|
|
27
|
+
require('../../Data/dist/effect-Data.cjs.dev.js');
|
|
24
28
|
require('../../dist/ReadonlyArray-9a1474f6.cjs.dev.js');
|
|
25
|
-
require('../../dist/ReadonlyRecord
|
|
26
|
-
require('../../dist/
|
|
27
|
-
require('../../dist/Context-
|
|
28
|
-
require('../../dist/
|
|
29
|
-
require('../../dist/
|
|
30
|
-
require('../../dist/
|
|
31
|
-
require('../../dist/HashSet-ece2cfe8.cjs.dev.js');
|
|
29
|
+
require('../../ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js');
|
|
30
|
+
require('../../Context/dist/effect-Context.cjs.dev.js');
|
|
31
|
+
require('../../dist/Context-593661f6.cjs.dev.js');
|
|
32
|
+
require('../../Differ/dist/effect-Differ.cjs.dev.js');
|
|
33
|
+
require('../../HashMap/dist/effect-HashMap.cjs.dev.js');
|
|
34
|
+
require('../../dist/HashSet-0b4ff1e4.cjs.dev.js');
|
|
32
35
|
require('../../dist/Stack-ada2d201.cjs.dev.js');
|
|
33
|
-
require('../../dist/HashSet
|
|
34
|
-
require('../../dist/FiberId-
|
|
35
|
-
require('../../dist/
|
|
36
|
-
require('../../dist/
|
|
37
|
-
require('../../dist/
|
|
38
|
-
require('../../dist/
|
|
39
|
-
require('../../dist/
|
|
40
|
-
require('../../dist/
|
|
41
|
-
require('../../dist/
|
|
42
|
-
require('../../dist/
|
|
43
|
-
require('../../dist/
|
|
44
|
-
require('../../dist/
|
|
45
|
-
require('../../dist/
|
|
46
|
-
require('../../dist/
|
|
47
|
-
require('../../dist/
|
|
48
|
-
require('../../dist/
|
|
49
|
-
require('../../dist/
|
|
50
|
-
require('../../dist/
|
|
51
|
-
require('../../dist/
|
|
52
|
-
require('../../dist/
|
|
53
|
-
require('../../dist/
|
|
54
|
-
require('../../dist/
|
|
55
|
-
require('../../dist/
|
|
56
|
-
require('../../dist/
|
|
57
|
-
require('../../dist/
|
|
58
|
-
require('../../dist/
|
|
59
|
-
require('../../dist/
|
|
60
|
-
require('../../dist/
|
|
61
|
-
require('../../dist/
|
|
62
|
-
require('../../dist/
|
|
63
|
-
require('../../dist/
|
|
64
|
-
require('../../dist/
|
|
65
|
-
require('../../dist/
|
|
66
|
-
require('../../dist/
|
|
67
|
-
require('../../dist/
|
|
68
|
-
require('../../dist/
|
|
69
|
-
require('../../dist/
|
|
70
|
-
require('../../dist/
|
|
71
|
-
require('../../dist/
|
|
72
|
-
require('../../dist/
|
|
73
|
-
require('../../dist/
|
|
74
|
-
require('../../dist/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
36
|
+
require('../../HashSet/dist/effect-HashSet.cjs.dev.js');
|
|
37
|
+
require('../../dist/FiberId-557db880.cjs.dev.js');
|
|
38
|
+
require('../../List/dist/effect-List.cjs.dev.js');
|
|
39
|
+
require('../../dist/RuntimeFlagsPatch-ea268c50.cjs.dev.js');
|
|
40
|
+
require('../../Boolean/dist/effect-Boolean.cjs.dev.js');
|
|
41
|
+
require('../../Deferred/dist/effect-Deferred.cjs.dev.js');
|
|
42
|
+
require('../../FiberRefs/dist/effect-FiberRefs.cjs.dev.js');
|
|
43
|
+
require('../../dist/fiberRefs-be4fae6a.cjs.dev.js');
|
|
44
|
+
require('../../FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js');
|
|
45
|
+
require('../../dist/patch-a1b2802f.cjs.dev.js');
|
|
46
|
+
require('../../FiberStatus/dist/effect-FiberStatus.cjs.dev.js');
|
|
47
|
+
require('../../dist/defaultServices-5530ff0e.cjs.dev.js');
|
|
48
|
+
require('../../Duration/dist/effect-Duration.cjs.dev.js');
|
|
49
|
+
require('../../dist/timeout-d380d3f8.cjs.dev.js');
|
|
50
|
+
require('../../dist/configProvider-ce43fdbf.cjs.dev.js');
|
|
51
|
+
require('../../dist/config-80900693.cjs.dev.js');
|
|
52
|
+
require('../../ConfigError/dist/effect-ConfigError.cjs.dev.js');
|
|
53
|
+
require('../../dist/configError-240e9b61.cjs.dev.js');
|
|
54
|
+
require('../../dist/configSecret-e34c1b14.cjs.dev.js');
|
|
55
|
+
require('../../dist/pathPatch-d9d41297.cjs.dev.js');
|
|
56
|
+
require('../../Number/dist/effect-Number.cjs.dev.js');
|
|
57
|
+
require('../../dist/core-effect-892f3686.cjs.dev.js');
|
|
58
|
+
require('../../Clock/dist/effect-Clock.cjs.dev.js');
|
|
59
|
+
require('../../dist/label-011edbe7.cjs.dev.js');
|
|
60
|
+
require('../../LogLevel/dist/effect-LogLevel.cjs.dev.js');
|
|
61
|
+
require('../../LogSpan/dist/effect-LogSpan.cjs.dev.js');
|
|
62
|
+
require('../../dist/Ref-74b592a4.cjs.dev.js');
|
|
63
|
+
require('../../Tracer/dist/effect-Tracer.cjs.dev.js');
|
|
64
|
+
require('../../dist/fiber-1bfb4c1d.cjs.dev.js');
|
|
65
|
+
require('../../Exit/dist/effect-Exit.cjs.dev.js');
|
|
66
|
+
require('../../dist/boundaries-3810d885.cjs.dev.js');
|
|
67
|
+
require('../../dist/key-f0a1408a.cjs.dev.js');
|
|
68
|
+
require('../../dist/keyType-55f27f07.cjs.dev.js');
|
|
69
|
+
require('../../dist/registry-1099de3f.cjs.dev.js');
|
|
70
|
+
require('../../dist/hook-e72b20fd.cjs.dev.js');
|
|
71
|
+
require('../../dist/state-8fbec044.cjs.dev.js');
|
|
72
|
+
require('../../dist/pair-291b78d7.cjs.dev.js');
|
|
73
|
+
require('../../MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js');
|
|
74
|
+
require('../../SortedSet/dist/effect-SortedSet.cjs.dev.js');
|
|
75
|
+
require('../../RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js');
|
|
76
|
+
require('../../Scheduler/dist/effect-Scheduler.cjs.dev.js');
|
|
77
|
+
require('../../MutableList/dist/effect-MutableList.cjs.dev.js');
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
|
|
85
|
+
const addSubscribers = (subscription, pollers) => subscribers => {
|
|
86
|
+
if (!subscribers.has(subscription)) {
|
|
87
|
+
subscribers.set(subscription, new Set());
|
|
88
|
+
}
|
|
89
|
+
const set = subscribers.get(subscription);
|
|
90
|
+
set.add(pollers);
|
|
91
|
+
};
|
|
92
|
+
const removeSubscribers = (subscription, pollers) => subscribers => {
|
|
93
|
+
if (!subscribers.has(subscription)) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const set = subscribers.get(subscription);
|
|
97
|
+
set.delete(pollers);
|
|
98
|
+
if (set.size === 0) {
|
|
99
|
+
subscribers.delete(subscription);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
const bounded$1 = requestedCapacity => Function_dist_effectFunction.pipe(core.sync(() => makeBoundedHub(requestedCapacity)), core.flatMap(atomicHub => makeHub(atomicHub, new BackPressureStrategy())));
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
const dropping$1 = requestedCapacity => Function_dist_effectFunction.pipe(core.sync(() => makeBoundedHub(requestedCapacity)), core.flatMap(atomicHub => makeHub(atomicHub, new DroppingStrategy())));
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
const sliding$1 = requestedCapacity => Function_dist_effectFunction.pipe(core.sync(() => makeBoundedHub(requestedCapacity)), core.flatMap(atomicHub => makeHub(atomicHub, new SlidingStrategy())));
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
const unbounded$1 = () => Function_dist_effectFunction.pipe(core.sync(() => makeUnboundedHub()), core.flatMap(atomicHub => makeHub(atomicHub, new DroppingStrategy())));
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
const capacity$1 = self => self.capacity();
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
const size$1 = self => self.size();
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
const isFull$1 = self => self.isFull();
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
const isEmpty$1 = self => self.isEmpty();
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
const shutdown$1 = self => self.shutdown();
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
const isShutdown$1 = self => self.isShutdown();
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
const awaitShutdown$1 = self => self.awaitShutdown();
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
const publish$1 = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => self.publish(value));
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
const publishAll$1 = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, elements) => self.publishAll(elements));
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
const subscribe$1 = self => self.subscribe();
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
const makeBoundedHub = requestedCapacity => {
|
|
147
|
+
ensureCapacity(requestedCapacity);
|
|
148
|
+
if (requestedCapacity === 1) {
|
|
149
|
+
return new BoundedHubSingle();
|
|
150
|
+
} else if (nextPow2(requestedCapacity) === requestedCapacity) {
|
|
151
|
+
return new BoundedHubPow2(requestedCapacity);
|
|
152
|
+
} else {
|
|
153
|
+
return new BoundedHubArb(requestedCapacity);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
const makeUnboundedHub = () => {
|
|
159
|
+
return new UnboundedHub();
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
const makeSubscription = (hub, subscribers, strategy) => core.map(core.deferredMake(), deferred => unsafeMakeSubscription(hub, subscribers, hub.subscribe(), MutableQueue_dist_effectMutableQueue.unbounded(), deferred, MutableRef_dist_effectMutableRef.make(false), strategy));
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
const unsafeMakeSubscription = (hub, subscribers, subscription, pollers, shutdownHook, shutdownFlag, strategy) => {
|
|
167
|
+
return new SubscriptionImpl(hub, subscribers, subscription, pollers, shutdownHook, shutdownFlag, strategy);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
class BoundedHubArb {
|
|
172
|
+
publisherIndex = 0;
|
|
173
|
+
subscriberCount = 0;
|
|
174
|
+
subscribersIndex = 0;
|
|
175
|
+
constructor(requestedCapacity) {
|
|
176
|
+
this.array = Array.from({
|
|
177
|
+
length: requestedCapacity
|
|
178
|
+
});
|
|
179
|
+
this.subscribers = Array.from({
|
|
180
|
+
length: requestedCapacity
|
|
181
|
+
});
|
|
182
|
+
this.capacity = requestedCapacity;
|
|
183
|
+
}
|
|
184
|
+
isEmpty() {
|
|
185
|
+
return this.publisherIndex === this.subscribersIndex;
|
|
186
|
+
}
|
|
187
|
+
isFull() {
|
|
188
|
+
return this.publisherIndex === this.subscribersIndex + this.capacity;
|
|
189
|
+
}
|
|
190
|
+
size() {
|
|
191
|
+
return this.publisherIndex - this.subscribersIndex;
|
|
192
|
+
}
|
|
193
|
+
publish(value) {
|
|
194
|
+
if (this.isFull()) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
if (this.subscriberCount !== 0) {
|
|
198
|
+
const index = this.publisherIndex % this.capacity;
|
|
199
|
+
this.array[index] = value;
|
|
200
|
+
this.subscribers[index] = this.subscriberCount;
|
|
201
|
+
this.publisherIndex += 1;
|
|
202
|
+
}
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
publishAll(elements) {
|
|
206
|
+
const chunk = Chunk_dist_effectChunk.fromIterable(elements);
|
|
207
|
+
const n = chunk.length;
|
|
208
|
+
const size = this.publisherIndex - this.subscribersIndex;
|
|
209
|
+
const available = this.capacity - size;
|
|
210
|
+
const forHub = Math.min(n, available);
|
|
211
|
+
if (forHub === 0) {
|
|
212
|
+
return chunk;
|
|
213
|
+
}
|
|
214
|
+
let iteratorIndex = 0;
|
|
215
|
+
const publishAllIndex = this.publisherIndex + forHub;
|
|
216
|
+
while (this.publisherIndex !== publishAllIndex) {
|
|
217
|
+
const a = Chunk_dist_effectChunk.unsafeGet(chunk, iteratorIndex++);
|
|
218
|
+
const index = this.publisherIndex % this.capacity;
|
|
219
|
+
this.array[index] = a;
|
|
220
|
+
this.subscribers[index] = this.subscriberCount;
|
|
221
|
+
this.publisherIndex += 1;
|
|
222
|
+
}
|
|
223
|
+
return Chunk_dist_effectChunk.drop(chunk, iteratorIndex);
|
|
224
|
+
}
|
|
225
|
+
slide() {
|
|
226
|
+
if (this.subscribersIndex !== this.publisherIndex) {
|
|
227
|
+
const index = this.subscribersIndex % this.capacity;
|
|
228
|
+
this.array[index] = null;
|
|
229
|
+
this.subscribers[index] = 0;
|
|
230
|
+
this.subscribersIndex += 1;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
subscribe() {
|
|
234
|
+
this.subscriberCount += 1;
|
|
235
|
+
return new BoundedHubArbSubscription(this, this.publisherIndex, false);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
class BoundedHubArbSubscription {
|
|
239
|
+
constructor(self, subscriberIndex, unsubscribed) {
|
|
240
|
+
this.self = self;
|
|
241
|
+
this.subscriberIndex = subscriberIndex;
|
|
242
|
+
this.unsubscribed = unsubscribed;
|
|
243
|
+
}
|
|
244
|
+
isEmpty() {
|
|
245
|
+
return this.unsubscribed || this.self.publisherIndex === this.subscriberIndex || this.self.publisherIndex === this.self.subscribersIndex;
|
|
246
|
+
}
|
|
247
|
+
size() {
|
|
248
|
+
if (this.unsubscribed) {
|
|
249
|
+
return 0;
|
|
250
|
+
}
|
|
251
|
+
return this.self.publisherIndex - Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
252
|
+
}
|
|
253
|
+
poll(default_) {
|
|
254
|
+
if (this.unsubscribed) {
|
|
255
|
+
return default_;
|
|
256
|
+
}
|
|
257
|
+
this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
258
|
+
if (this.subscriberIndex !== this.self.publisherIndex) {
|
|
259
|
+
const index = this.subscriberIndex % this.self.capacity;
|
|
260
|
+
const elem = this.self.array[index];
|
|
261
|
+
this.self.subscribers[index] -= 1;
|
|
262
|
+
if (this.self.subscribers[index] === 0) {
|
|
263
|
+
this.self.array[index] = null;
|
|
264
|
+
this.self.subscribersIndex += 1;
|
|
265
|
+
}
|
|
266
|
+
this.subscriberIndex += 1;
|
|
267
|
+
return elem;
|
|
268
|
+
}
|
|
269
|
+
return default_;
|
|
270
|
+
}
|
|
271
|
+
pollUpTo(n) {
|
|
272
|
+
if (this.unsubscribed) {
|
|
273
|
+
return Chunk_dist_effectChunk.empty();
|
|
274
|
+
}
|
|
275
|
+
this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
276
|
+
const size = this.self.publisherIndex - this.subscriberIndex;
|
|
277
|
+
const toPoll = Math.min(n, size);
|
|
278
|
+
if (toPoll <= 0) {
|
|
279
|
+
return Chunk_dist_effectChunk.empty();
|
|
280
|
+
}
|
|
281
|
+
const builder = [];
|
|
282
|
+
const pollUpToIndex = this.subscriberIndex + toPoll;
|
|
283
|
+
while (this.subscriberIndex !== pollUpToIndex) {
|
|
284
|
+
const index = this.subscriberIndex % this.self.capacity;
|
|
285
|
+
const a = this.self.array[index];
|
|
286
|
+
this.self.subscribers[index] -= 1;
|
|
287
|
+
if (this.self.subscribers[index] === 0) {
|
|
288
|
+
this.self.array[index] = null;
|
|
289
|
+
this.self.subscribersIndex += 1;
|
|
290
|
+
}
|
|
291
|
+
builder.push(a);
|
|
292
|
+
this.subscriberIndex += 1;
|
|
293
|
+
}
|
|
294
|
+
return Chunk_dist_effectChunk.fromIterable(builder);
|
|
295
|
+
}
|
|
296
|
+
unsubscribe() {
|
|
297
|
+
if (!this.unsubscribed) {
|
|
298
|
+
this.unsubscribed = true;
|
|
299
|
+
this.self.subscriberCount -= 1;
|
|
300
|
+
this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
301
|
+
while (this.subscriberIndex !== this.self.publisherIndex) {
|
|
302
|
+
const index = this.subscriberIndex % this.self.capacity;
|
|
303
|
+
this.self.subscribers[index] -= 1;
|
|
304
|
+
if (this.self.subscribers[index] === 0) {
|
|
305
|
+
this.self.array[index] = null;
|
|
306
|
+
this.self.subscribersIndex += 1;
|
|
307
|
+
}
|
|
308
|
+
this.subscriberIndex += 1;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/** @internal */
|
|
315
|
+
class BoundedHubPow2 {
|
|
316
|
+
publisherIndex = 0;
|
|
317
|
+
subscriberCount = 0;
|
|
318
|
+
subscribersIndex = 0;
|
|
319
|
+
constructor(requestedCapacity) {
|
|
320
|
+
this.array = Array.from({
|
|
321
|
+
length: requestedCapacity
|
|
322
|
+
});
|
|
323
|
+
this.mask = requestedCapacity - 1;
|
|
324
|
+
this.subscribers = Array.from({
|
|
325
|
+
length: requestedCapacity
|
|
326
|
+
});
|
|
327
|
+
this.capacity = requestedCapacity;
|
|
328
|
+
}
|
|
329
|
+
isEmpty() {
|
|
330
|
+
return this.publisherIndex === this.subscribersIndex;
|
|
331
|
+
}
|
|
332
|
+
isFull() {
|
|
333
|
+
return this.publisherIndex === this.subscribersIndex + this.capacity;
|
|
334
|
+
}
|
|
335
|
+
size() {
|
|
336
|
+
return this.publisherIndex - this.subscribersIndex;
|
|
337
|
+
}
|
|
338
|
+
publish(value) {
|
|
339
|
+
if (this.isFull()) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
if (this.subscriberCount !== 0) {
|
|
343
|
+
const index = this.publisherIndex & this.mask;
|
|
344
|
+
this.array[index] = value;
|
|
345
|
+
this.subscribers[index] = this.subscriberCount;
|
|
346
|
+
this.publisherIndex += 1;
|
|
347
|
+
}
|
|
348
|
+
return true;
|
|
349
|
+
}
|
|
350
|
+
publishAll(elements) {
|
|
351
|
+
const chunk = Chunk_dist_effectChunk.fromIterable(elements);
|
|
352
|
+
const n = chunk.length;
|
|
353
|
+
const size = this.publisherIndex - this.subscribersIndex;
|
|
354
|
+
const available = this.capacity - size;
|
|
355
|
+
const forHub = Math.min(n, available);
|
|
356
|
+
if (forHub === 0) {
|
|
357
|
+
return chunk;
|
|
358
|
+
}
|
|
359
|
+
let iteratorIndex = 0;
|
|
360
|
+
const publishAllIndex = this.publisherIndex + forHub;
|
|
361
|
+
while (this.publisherIndex !== publishAllIndex) {
|
|
362
|
+
const elem = Chunk_dist_effectChunk.unsafeGet(chunk, iteratorIndex++);
|
|
363
|
+
const index = this.publisherIndex & this.mask;
|
|
364
|
+
this.array[index] = elem;
|
|
365
|
+
this.subscribers[index] = this.subscriberCount;
|
|
366
|
+
this.publisherIndex += 1;
|
|
367
|
+
}
|
|
368
|
+
return Chunk_dist_effectChunk.drop(chunk, iteratorIndex);
|
|
369
|
+
}
|
|
370
|
+
slide() {
|
|
371
|
+
if (this.subscribersIndex !== this.publisherIndex) {
|
|
372
|
+
const index = this.subscribersIndex & this.mask;
|
|
373
|
+
this.array[index] = null;
|
|
374
|
+
this.subscribers[index] = 0;
|
|
375
|
+
this.subscribersIndex += 1;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
subscribe() {
|
|
379
|
+
this.subscriberCount += 1;
|
|
380
|
+
return new BoundedHubPow2Subscription(this, this.publisherIndex, false);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** @internal */
|
|
385
|
+
class BoundedHubPow2Subscription {
|
|
386
|
+
constructor(self, subscriberIndex, unsubscribed) {
|
|
387
|
+
this.self = self;
|
|
388
|
+
this.subscriberIndex = subscriberIndex;
|
|
389
|
+
this.unsubscribed = unsubscribed;
|
|
390
|
+
}
|
|
391
|
+
isEmpty() {
|
|
392
|
+
return this.unsubscribed || this.self.publisherIndex === this.subscriberIndex || this.self.publisherIndex === this.self.subscribersIndex;
|
|
393
|
+
}
|
|
394
|
+
size() {
|
|
395
|
+
if (this.unsubscribed) {
|
|
396
|
+
return 0;
|
|
397
|
+
}
|
|
398
|
+
return this.self.publisherIndex - Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
399
|
+
}
|
|
400
|
+
poll(default_) {
|
|
401
|
+
if (this.unsubscribed) {
|
|
402
|
+
return default_;
|
|
403
|
+
}
|
|
404
|
+
this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
405
|
+
if (this.subscriberIndex !== this.self.publisherIndex) {
|
|
406
|
+
const index = this.subscriberIndex & this.self.mask;
|
|
407
|
+
const elem = this.self.array[index];
|
|
408
|
+
this.self.subscribers[index] -= 1;
|
|
409
|
+
if (this.self.subscribers[index] === 0) {
|
|
410
|
+
this.self.array[index] = null;
|
|
411
|
+
this.self.subscribersIndex += 1;
|
|
412
|
+
}
|
|
413
|
+
this.subscriberIndex += 1;
|
|
414
|
+
return elem;
|
|
415
|
+
}
|
|
416
|
+
return default_;
|
|
417
|
+
}
|
|
418
|
+
pollUpTo(n) {
|
|
419
|
+
if (this.unsubscribed) {
|
|
420
|
+
return Chunk_dist_effectChunk.empty();
|
|
421
|
+
}
|
|
422
|
+
this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
423
|
+
const size = this.self.publisherIndex - this.subscriberIndex;
|
|
424
|
+
const toPoll = Math.min(n, size);
|
|
425
|
+
if (toPoll <= 0) {
|
|
426
|
+
return Chunk_dist_effectChunk.empty();
|
|
427
|
+
}
|
|
428
|
+
const builder = [];
|
|
429
|
+
const pollUpToIndex = this.subscriberIndex + toPoll;
|
|
430
|
+
while (this.subscriberIndex !== pollUpToIndex) {
|
|
431
|
+
const index = this.subscriberIndex & this.self.mask;
|
|
432
|
+
const elem = this.self.array[index];
|
|
433
|
+
this.self.subscribers[index] -= 1;
|
|
434
|
+
if (this.self.subscribers[index] === 0) {
|
|
435
|
+
this.self.array[index] = null;
|
|
436
|
+
this.self.subscribersIndex += 1;
|
|
437
|
+
}
|
|
438
|
+
builder.push(elem);
|
|
439
|
+
this.subscriberIndex += 1;
|
|
440
|
+
}
|
|
441
|
+
return Chunk_dist_effectChunk.fromIterable(builder);
|
|
442
|
+
}
|
|
443
|
+
unsubscribe() {
|
|
444
|
+
if (!this.unsubscribed) {
|
|
445
|
+
this.unsubscribed = true;
|
|
446
|
+
this.self.subscriberCount -= 1;
|
|
447
|
+
this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
448
|
+
while (this.subscriberIndex !== this.self.publisherIndex) {
|
|
449
|
+
const index = this.subscriberIndex & this.self.mask;
|
|
450
|
+
this.self.subscribers[index] -= 1;
|
|
451
|
+
if (this.self.subscribers[index] === 0) {
|
|
452
|
+
this.self.array[index] = null;
|
|
453
|
+
this.self.subscribersIndex += 1;
|
|
454
|
+
}
|
|
455
|
+
this.subscriberIndex += 1;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/** @internal */
|
|
462
|
+
class BoundedHubSingle {
|
|
463
|
+
publisherIndex = 0;
|
|
464
|
+
subscriberCount = 0;
|
|
465
|
+
subscribers = 0;
|
|
466
|
+
value = null;
|
|
467
|
+
capacity = 1;
|
|
468
|
+
pipe() {
|
|
469
|
+
return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
|
|
470
|
+
}
|
|
471
|
+
isEmpty() {
|
|
472
|
+
return this.subscribers === 0;
|
|
473
|
+
}
|
|
474
|
+
isFull() {
|
|
475
|
+
return !this.isEmpty();
|
|
476
|
+
}
|
|
477
|
+
size() {
|
|
478
|
+
return this.isEmpty() ? 0 : 1;
|
|
479
|
+
}
|
|
480
|
+
publish(value) {
|
|
481
|
+
if (this.isFull()) {
|
|
482
|
+
return false;
|
|
483
|
+
}
|
|
484
|
+
if (this.subscriberCount !== 0) {
|
|
485
|
+
this.value = value;
|
|
486
|
+
this.subscribers = this.subscriberCount;
|
|
487
|
+
this.publisherIndex += 1;
|
|
488
|
+
}
|
|
489
|
+
return true;
|
|
490
|
+
}
|
|
491
|
+
publishAll(elements) {
|
|
492
|
+
const chunk = Chunk_dist_effectChunk.fromIterable(elements);
|
|
493
|
+
if (Chunk_dist_effectChunk.isEmpty(chunk)) {
|
|
494
|
+
return chunk;
|
|
495
|
+
}
|
|
496
|
+
if (this.publish(Chunk_dist_effectChunk.unsafeHead(chunk))) {
|
|
497
|
+
return Chunk_dist_effectChunk.drop(chunk, 1);
|
|
498
|
+
} else {
|
|
499
|
+
return chunk;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
slide() {
|
|
503
|
+
if (this.isFull()) {
|
|
504
|
+
this.subscribers = 0;
|
|
505
|
+
this.value = null;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
subscribe() {
|
|
509
|
+
this.subscriberCount += 1;
|
|
510
|
+
return new BoundedHubSingleSubscription(this, this.publisherIndex, false);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/** @internal */
|
|
515
|
+
class BoundedHubSingleSubscription {
|
|
516
|
+
constructor(self, subscriberIndex, unsubscribed) {
|
|
517
|
+
this.self = self;
|
|
518
|
+
this.subscriberIndex = subscriberIndex;
|
|
519
|
+
this.unsubscribed = unsubscribed;
|
|
520
|
+
}
|
|
521
|
+
isEmpty() {
|
|
522
|
+
return this.unsubscribed || this.self.subscribers === 0 || this.subscriberIndex === this.self.publisherIndex;
|
|
523
|
+
}
|
|
524
|
+
size() {
|
|
525
|
+
return this.isEmpty() ? 0 : 1;
|
|
526
|
+
}
|
|
527
|
+
poll(default_) {
|
|
528
|
+
if (this.isEmpty()) {
|
|
529
|
+
return default_;
|
|
530
|
+
}
|
|
531
|
+
const elem = this.self.value;
|
|
532
|
+
this.self.subscribers -= 1;
|
|
533
|
+
if (this.self.subscribers === 0) {
|
|
534
|
+
this.self.value = null;
|
|
535
|
+
}
|
|
536
|
+
this.subscriberIndex += 1;
|
|
537
|
+
return elem;
|
|
538
|
+
}
|
|
539
|
+
pollUpTo(n) {
|
|
540
|
+
if (this.isEmpty() || n < 1) {
|
|
541
|
+
return Chunk_dist_effectChunk.empty();
|
|
542
|
+
}
|
|
543
|
+
const a = this.self.value;
|
|
544
|
+
this.self.subscribers -= 1;
|
|
545
|
+
if (this.self.subscribers === 0) {
|
|
546
|
+
this.self.value = null;
|
|
547
|
+
}
|
|
548
|
+
this.subscriberIndex += 1;
|
|
549
|
+
return Chunk_dist_effectChunk.of(a);
|
|
550
|
+
}
|
|
551
|
+
unsubscribe() {
|
|
552
|
+
if (!this.unsubscribed) {
|
|
553
|
+
this.unsubscribed = true;
|
|
554
|
+
this.self.subscriberCount -= 1;
|
|
555
|
+
if (this.subscriberIndex !== this.self.publisherIndex) {
|
|
556
|
+
this.self.subscribers -= 1;
|
|
557
|
+
if (this.self.subscribers === 0) {
|
|
558
|
+
this.self.value = null;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/** @internal */
|
|
566
|
+
class Node {
|
|
567
|
+
constructor(value, subscribers, next) {
|
|
568
|
+
this.value = value;
|
|
569
|
+
this.subscribers = subscribers;
|
|
570
|
+
this.next = next;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/** @internal */
|
|
575
|
+
class UnboundedHub {
|
|
576
|
+
publisherHead = new Node(null, 0, null);
|
|
577
|
+
publisherIndex = 0;
|
|
578
|
+
subscribersIndex = 0;
|
|
579
|
+
capacity = Number.MAX_SAFE_INTEGER;
|
|
580
|
+
constructor() {
|
|
581
|
+
this.publisherTail = this.publisherHead;
|
|
582
|
+
}
|
|
583
|
+
isEmpty() {
|
|
584
|
+
return this.publisherHead === this.publisherTail;
|
|
585
|
+
}
|
|
586
|
+
isFull() {
|
|
587
|
+
return false;
|
|
588
|
+
}
|
|
589
|
+
size() {
|
|
590
|
+
return this.publisherIndex - this.subscribersIndex;
|
|
591
|
+
}
|
|
592
|
+
publish(value) {
|
|
593
|
+
const subscribers = this.publisherTail.subscribers;
|
|
594
|
+
if (subscribers !== 0) {
|
|
595
|
+
this.publisherTail.next = new Node(value, subscribers, null);
|
|
596
|
+
this.publisherTail = this.publisherTail.next;
|
|
597
|
+
this.publisherIndex += 1;
|
|
598
|
+
}
|
|
599
|
+
return true;
|
|
600
|
+
}
|
|
601
|
+
publishAll(elements) {
|
|
602
|
+
for (const a of elements) {
|
|
603
|
+
this.publish(a);
|
|
604
|
+
}
|
|
605
|
+
return Chunk_dist_effectChunk.empty();
|
|
606
|
+
}
|
|
607
|
+
slide() {
|
|
608
|
+
if (this.publisherHead !== this.publisherTail) {
|
|
609
|
+
this.publisherHead = this.publisherHead.next;
|
|
610
|
+
this.publisherHead.value = null;
|
|
611
|
+
this.subscribersIndex += 1;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
subscribe() {
|
|
615
|
+
this.publisherTail.subscribers += 1;
|
|
616
|
+
return new UnboundedHubSubscription(this, this.publisherTail, this.publisherIndex, false);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/** @internal */
|
|
621
|
+
class UnboundedHubSubscription {
|
|
622
|
+
constructor(self, subscriberHead, subscriberIndex, unsubscribed) {
|
|
623
|
+
this.self = self;
|
|
624
|
+
this.subscriberHead = subscriberHead;
|
|
625
|
+
this.subscriberIndex = subscriberIndex;
|
|
626
|
+
this.unsubscribed = unsubscribed;
|
|
627
|
+
}
|
|
628
|
+
isEmpty() {
|
|
629
|
+
if (this.unsubscribed) {
|
|
630
|
+
return true;
|
|
631
|
+
}
|
|
632
|
+
let empty = true;
|
|
633
|
+
let loop = true;
|
|
634
|
+
while (loop) {
|
|
635
|
+
if (this.subscriberHead === this.self.publisherTail) {
|
|
636
|
+
loop = false;
|
|
637
|
+
} else {
|
|
638
|
+
if (this.subscriberHead.next.value !== null) {
|
|
639
|
+
empty = false;
|
|
640
|
+
loop = false;
|
|
641
|
+
} else {
|
|
642
|
+
this.subscriberHead = this.subscriberHead.next;
|
|
643
|
+
this.subscriberIndex += 1;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
return empty;
|
|
648
|
+
}
|
|
649
|
+
size() {
|
|
650
|
+
if (this.unsubscribed) {
|
|
651
|
+
return 0;
|
|
652
|
+
}
|
|
653
|
+
return this.self.publisherIndex - Math.max(this.subscriberIndex, this.self.subscribersIndex);
|
|
654
|
+
}
|
|
655
|
+
poll(default_) {
|
|
656
|
+
if (this.unsubscribed) {
|
|
657
|
+
return default_;
|
|
658
|
+
}
|
|
659
|
+
let loop = true;
|
|
660
|
+
let polled = default_;
|
|
661
|
+
while (loop) {
|
|
662
|
+
if (this.subscriberHead === this.self.publisherTail) {
|
|
663
|
+
loop = false;
|
|
664
|
+
} else {
|
|
665
|
+
const elem = this.subscriberHead.next.value;
|
|
666
|
+
if (elem !== null) {
|
|
667
|
+
polled = elem;
|
|
668
|
+
this.subscriberHead.subscribers -= 1;
|
|
669
|
+
if (this.subscriberHead.subscribers === 0) {
|
|
670
|
+
this.self.publisherHead = this.self.publisherHead.next;
|
|
671
|
+
this.self.publisherHead.value = null;
|
|
672
|
+
this.self.subscribersIndex += 1;
|
|
673
|
+
}
|
|
674
|
+
loop = false;
|
|
675
|
+
}
|
|
676
|
+
this.subscriberHead = this.subscriberHead.next;
|
|
677
|
+
this.subscriberIndex += 1;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return polled;
|
|
681
|
+
}
|
|
682
|
+
pollUpTo(n) {
|
|
683
|
+
const builder = [];
|
|
684
|
+
const default_ = null;
|
|
685
|
+
let i = 0;
|
|
686
|
+
while (i !== n) {
|
|
687
|
+
const a = this.poll(default_);
|
|
688
|
+
if (a === default_) {
|
|
689
|
+
i = n;
|
|
690
|
+
} else {
|
|
691
|
+
builder.push(a);
|
|
692
|
+
i += 1;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
return Chunk_dist_effectChunk.fromIterable(builder);
|
|
696
|
+
}
|
|
697
|
+
unsubscribe() {
|
|
698
|
+
if (!this.unsubscribed) {
|
|
699
|
+
this.unsubscribed = true;
|
|
700
|
+
this.self.publisherTail.subscribers -= 1;
|
|
701
|
+
while (this.subscriberHead !== this.self.publisherTail) {
|
|
702
|
+
if (this.subscriberHead.next.value !== null) {
|
|
703
|
+
this.subscriberHead.subscribers -= 1;
|
|
704
|
+
if (this.subscriberHead.subscribers === 0) {
|
|
705
|
+
this.self.publisherHead = this.self.publisherHead.next;
|
|
706
|
+
this.self.publisherHead.value = null;
|
|
707
|
+
this.self.subscribersIndex += 1;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
this.subscriberHead = this.subscriberHead.next;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/** @internal */
|
|
717
|
+
class SubscriptionImpl {
|
|
718
|
+
[queue.DequeueTypeId] = queue.dequeueVariance;
|
|
719
|
+
constructor(hub, subscribers, subscription, pollers, shutdownHook, shutdownFlag, strategy) {
|
|
720
|
+
this.hub = hub;
|
|
721
|
+
this.subscribers = subscribers;
|
|
722
|
+
this.subscription = subscription;
|
|
723
|
+
this.pollers = pollers;
|
|
724
|
+
this.shutdownHook = shutdownHook;
|
|
725
|
+
this.shutdownFlag = shutdownFlag;
|
|
726
|
+
this.strategy = strategy;
|
|
727
|
+
}
|
|
728
|
+
pipe() {
|
|
729
|
+
return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
|
|
730
|
+
}
|
|
731
|
+
capacity() {
|
|
732
|
+
return this.hub.capacity;
|
|
733
|
+
}
|
|
734
|
+
isActive() {
|
|
735
|
+
return !MutableRef_dist_effectMutableRef.get(this.shutdownFlag);
|
|
736
|
+
}
|
|
737
|
+
size() {
|
|
738
|
+
return core.suspend(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag) ? core.interrupt : core.succeed(this.subscription.size()));
|
|
739
|
+
}
|
|
740
|
+
unsafeSize() {
|
|
741
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
742
|
+
return Option_dist_effectOption.none();
|
|
743
|
+
}
|
|
744
|
+
return Option_dist_effectOption.some(this.subscription.size());
|
|
745
|
+
}
|
|
746
|
+
isFull() {
|
|
747
|
+
return core.map(this.size(), size => size === this.capacity());
|
|
748
|
+
}
|
|
749
|
+
isEmpty() {
|
|
750
|
+
return core.map(this.size(), size => size === 0);
|
|
751
|
+
}
|
|
752
|
+
shutdown() {
|
|
753
|
+
return core.uninterruptible(core.withFiberRuntime(state => {
|
|
754
|
+
MutableRef_dist_effectMutableRef.set(this.shutdownFlag, true);
|
|
755
|
+
return Function_dist_effectFunction.pipe(fiberRuntime.forEachParUnbounded(unsafePollAllQueue(this.pollers), d => core.deferredInterruptWith(d, state.id()), false), core.zipRight(core.sync(() => {
|
|
756
|
+
this.subscribers.delete(this.subscription);
|
|
757
|
+
this.subscription.unsubscribe();
|
|
758
|
+
this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
|
|
759
|
+
})), core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0)), core.asUnit);
|
|
760
|
+
}));
|
|
761
|
+
}
|
|
762
|
+
isShutdown() {
|
|
763
|
+
return core.sync(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag));
|
|
764
|
+
}
|
|
765
|
+
awaitShutdown() {
|
|
766
|
+
return core.deferredAwait(this.shutdownHook);
|
|
767
|
+
}
|
|
768
|
+
take() {
|
|
769
|
+
return core.withFiberRuntime(state => {
|
|
770
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
771
|
+
return core.interrupt;
|
|
772
|
+
}
|
|
773
|
+
const message = MutableQueue_dist_effectMutableQueue.isEmpty(this.pollers) ? this.subscription.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) : MutableQueue_dist_effectMutableQueue.EmptyMutableQueue;
|
|
774
|
+
if (message === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
|
|
775
|
+
const deferred = core.deferredUnsafeMake(state.id());
|
|
776
|
+
return Function_dist_effectFunction.pipe(core.suspend(() => {
|
|
777
|
+
Function_dist_effectFunction.pipe(this.pollers, MutableQueue_dist_effectMutableQueue.offer(deferred));
|
|
778
|
+
Function_dist_effectFunction.pipe(this.subscribers, addSubscribers(this.subscription, this.pollers));
|
|
779
|
+
this.strategy.unsafeCompletePollers(this.hub, this.subscribers, this.subscription, this.pollers);
|
|
780
|
+
return MutableRef_dist_effectMutableRef.get(this.shutdownFlag) ? core.interrupt : core.deferredAwait(deferred);
|
|
781
|
+
}), core.onInterrupt(() => core.sync(() => unsafeRemove(this.pollers, deferred))));
|
|
782
|
+
} else {
|
|
783
|
+
this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
|
|
784
|
+
return core.succeed(message);
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
takeAll() {
|
|
789
|
+
return core.suspend(() => {
|
|
790
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
791
|
+
return core.interrupt;
|
|
792
|
+
}
|
|
793
|
+
const as = MutableQueue_dist_effectMutableQueue.isEmpty(this.pollers) ? unsafePollAllSubscription(this.subscription) : Chunk_dist_effectChunk.empty();
|
|
794
|
+
this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
|
|
795
|
+
return core.succeed(as);
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
takeUpTo(max) {
|
|
799
|
+
return core.suspend(() => {
|
|
800
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
801
|
+
return core.interrupt;
|
|
802
|
+
}
|
|
803
|
+
const as = MutableQueue_dist_effectMutableQueue.isEmpty(this.pollers) ? unsafePollN(this.subscription, max) : Chunk_dist_effectChunk.empty();
|
|
804
|
+
this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
|
|
805
|
+
return core.succeed(as);
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
takeBetween(min, max) {
|
|
809
|
+
return core.suspend(() => takeRemainderLoop(this, min, max, Chunk_dist_effectChunk.empty()));
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/** @internal */
|
|
814
|
+
const takeRemainderLoop = (self, min, max, acc) => {
|
|
815
|
+
if (max < min) {
|
|
816
|
+
return core.succeed(acc);
|
|
817
|
+
}
|
|
818
|
+
return Function_dist_effectFunction.pipe(self.takeUpTo(max), core.flatMap(bs => {
|
|
819
|
+
const remaining = min - bs.length;
|
|
820
|
+
if (remaining === 1) {
|
|
821
|
+
return Function_dist_effectFunction.pipe(self.take(), core.map(b => Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(bs), Chunk_dist_effectChunk.append(b))));
|
|
822
|
+
}
|
|
823
|
+
if (remaining > 1) {
|
|
824
|
+
return Function_dist_effectFunction.pipe(self.take(), core.flatMap(b => takeRemainderLoop(self, remaining - 1, max - bs.length - 1, Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(bs), Chunk_dist_effectChunk.append(b)))));
|
|
825
|
+
}
|
|
826
|
+
return core.succeed(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(bs)));
|
|
827
|
+
}));
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
/** @internal */
|
|
831
|
+
class HubImpl {
|
|
832
|
+
[queue.EnqueueTypeId] = queue.enqueueVariance;
|
|
833
|
+
constructor(hub, subscribers, scope, shutdownHook, shutdownFlag, strategy) {
|
|
834
|
+
this.hub = hub;
|
|
835
|
+
this.subscribers = subscribers;
|
|
836
|
+
this.scope = scope;
|
|
837
|
+
this.shutdownHook = shutdownHook;
|
|
838
|
+
this.shutdownFlag = shutdownFlag;
|
|
839
|
+
this.strategy = strategy;
|
|
840
|
+
}
|
|
841
|
+
capacity() {
|
|
842
|
+
return this.hub.capacity;
|
|
843
|
+
}
|
|
844
|
+
size() {
|
|
845
|
+
return core.suspend(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag) ? core.interrupt : core.sync(() => this.hub.size()));
|
|
846
|
+
}
|
|
847
|
+
unsafeSize() {
|
|
848
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
849
|
+
return Option_dist_effectOption.none();
|
|
850
|
+
}
|
|
851
|
+
return Option_dist_effectOption.some(this.hub.size());
|
|
852
|
+
}
|
|
853
|
+
isFull() {
|
|
854
|
+
return core.map(this.size(), size => size === this.capacity());
|
|
855
|
+
}
|
|
856
|
+
isEmpty() {
|
|
857
|
+
return core.map(this.size(), size => size === 0);
|
|
858
|
+
}
|
|
859
|
+
awaitShutdown() {
|
|
860
|
+
return core.deferredAwait(this.shutdownHook);
|
|
861
|
+
}
|
|
862
|
+
isShutdown() {
|
|
863
|
+
return core.sync(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag));
|
|
864
|
+
}
|
|
865
|
+
shutdown() {
|
|
866
|
+
return core.uninterruptible(core.withFiberRuntime(state => {
|
|
867
|
+
Function_dist_effectFunction.pipe(this.shutdownFlag, MutableRef_dist_effectMutableRef.set(true));
|
|
868
|
+
return Function_dist_effectFunction.pipe(this.scope.close(core.exitInterrupt(state.id())), core.zipRight(this.strategy.shutdown()), core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0)), core.asUnit);
|
|
869
|
+
}));
|
|
870
|
+
}
|
|
871
|
+
publish(value) {
|
|
872
|
+
return core.suspend(() => {
|
|
873
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
874
|
+
return core.interrupt;
|
|
875
|
+
}
|
|
876
|
+
if (this.hub.publish(value)) {
|
|
877
|
+
this.strategy.unsafeCompleteSubscribers(this.hub, this.subscribers);
|
|
878
|
+
return core.succeed(true);
|
|
879
|
+
}
|
|
880
|
+
return this.strategy.handleSurplus(this.hub, this.subscribers, Chunk_dist_effectChunk.of(value), this.shutdownFlag);
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
isActive() {
|
|
884
|
+
return !MutableRef_dist_effectMutableRef.get(this.shutdownFlag);
|
|
885
|
+
}
|
|
886
|
+
unsafeOffer(value) {
|
|
887
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
if (this.hub.publish(value)) {
|
|
891
|
+
this.strategy.unsafeCompleteSubscribers(this.hub, this.subscribers);
|
|
892
|
+
return true;
|
|
893
|
+
}
|
|
894
|
+
return false;
|
|
895
|
+
}
|
|
896
|
+
publishAll(elements) {
|
|
897
|
+
return core.suspend(() => {
|
|
898
|
+
if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
|
|
899
|
+
return core.interrupt;
|
|
900
|
+
}
|
|
901
|
+
const surplus = unsafePublishAll(this.hub, elements);
|
|
902
|
+
this.strategy.unsafeCompleteSubscribers(this.hub, this.subscribers);
|
|
903
|
+
if (Chunk_dist_effectChunk.isEmpty(surplus)) {
|
|
904
|
+
return core.succeed(true);
|
|
905
|
+
}
|
|
906
|
+
return this.strategy.handleSurplus(this.hub, this.subscribers, surplus, this.shutdownFlag);
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
subscribe() {
|
|
910
|
+
const acquire = core.tap(fiberRuntime.all([this.scope.fork(ExecutionStrategy_dist_effectExecutionStrategy.sequential), makeSubscription(this.hub, this.subscribers, this.strategy)]), tuple => tuple[0].addFinalizer(() => tuple[1].shutdown()));
|
|
911
|
+
return core.map(fiberRuntime.acquireRelease(acquire, (tuple, exit) => tuple[0].close(exit)), tuple => tuple[1]);
|
|
912
|
+
}
|
|
913
|
+
offer(value) {
|
|
914
|
+
return this.publish(value);
|
|
915
|
+
}
|
|
916
|
+
offerAll(elements) {
|
|
917
|
+
return this.publishAll(elements);
|
|
918
|
+
}
|
|
919
|
+
pipe() {
|
|
920
|
+
return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/** @internal */
|
|
925
|
+
const makeHub = (hub, strategy) => core.flatMap(fiberRuntime.scopeMake(), scope => core.map(core.deferredMake(), deferred => unsafeMakeHub(hub, new Map(), scope, deferred, MutableRef_dist_effectMutableRef.make(false), strategy)));
|
|
926
|
+
|
|
927
|
+
/** @internal */
|
|
928
|
+
const unsafeMakeHub = (hub, subscribers, scope, shutdownHook, shutdownFlag, strategy) => {
|
|
929
|
+
return new HubImpl(hub, subscribers, scope, shutdownHook, shutdownFlag, strategy);
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
/** @internal */
|
|
933
|
+
const nextPow2 = n => {
|
|
934
|
+
const nextPow = Math.ceil(Math.log(n) / Math.log(2.0));
|
|
935
|
+
return Math.max(Math.pow(2, nextPow), 2);
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
/** @internal */
|
|
939
|
+
const ensureCapacity = capacity => {
|
|
940
|
+
if (capacity <= 0) {
|
|
941
|
+
throw core.InvalidHubCapacityException(`Cannot construct Hub with capacity of ${capacity}`);
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
/** @internal */
|
|
946
|
+
const unsafeCompleteDeferred = (deferred, a) => {
|
|
947
|
+
core.deferredUnsafeDone(deferred, core.succeed(a));
|
|
948
|
+
};
|
|
949
|
+
|
|
950
|
+
/** @internal */
|
|
951
|
+
const unsafeOfferAll = (queue, as) => {
|
|
952
|
+
return Function_dist_effectFunction.pipe(queue, MutableQueue_dist_effectMutableQueue.offerAll(as));
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
/** @internal */
|
|
956
|
+
const unsafePollAllQueue = queue => {
|
|
957
|
+
return Function_dist_effectFunction.pipe(queue, MutableQueue_dist_effectMutableQueue.pollUpTo(Number.POSITIVE_INFINITY));
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
/** @internal */
|
|
961
|
+
const unsafePollAllSubscription = subscription => {
|
|
962
|
+
return subscription.pollUpTo(Number.POSITIVE_INFINITY);
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
/** @internal */
|
|
966
|
+
const unsafePollN = (subscription, max) => {
|
|
967
|
+
return subscription.pollUpTo(max);
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
/** @internal */
|
|
971
|
+
const unsafePublishAll = (hub, as) => {
|
|
972
|
+
return hub.publishAll(as);
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
/** @internal */
|
|
976
|
+
const unsafeRemove = (queue, value) => {
|
|
977
|
+
unsafeOfferAll(queue, Function_dist_effectFunction.pipe(unsafePollAllQueue(queue), Chunk_dist_effectChunk.filter(elem => elem !== value)));
|
|
978
|
+
};
|
|
979
|
+
|
|
980
|
+
// -----------------------------------------------------------------------------
|
|
981
|
+
// Hub.Strategy
|
|
982
|
+
// -----------------------------------------------------------------------------
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* A `HubStrategy<A>` describes the protocol for how publishers and subscribers
|
|
986
|
+
* will communicate with each other through the hub.
|
|
987
|
+
*
|
|
988
|
+
* @internal
|
|
989
|
+
*/
|
|
990
|
+
/**
|
|
991
|
+
* A strategy that applies back pressure to publishers when the hub is at
|
|
992
|
+
* capacity. This guarantees that all subscribers will receive all messages
|
|
993
|
+
* published to the hub while they are subscribed. However, it creates the
|
|
994
|
+
* risk that a slow subscriber will slow down the rate at which messages
|
|
995
|
+
* are published and received by other subscribers.
|
|
996
|
+
*
|
|
997
|
+
* @internal
|
|
998
|
+
*/
|
|
999
|
+
class BackPressureStrategy {
|
|
1000
|
+
publishers = MutableQueue_dist_effectMutableQueue.unbounded();
|
|
1001
|
+
shutdown() {
|
|
1002
|
+
return core.flatMap(core.fiberId, fiberId => core.flatMap(core.sync(() => unsafePollAllQueue(this.publishers)), publishers => fiberRuntime.forEachParUnboundedDiscard(publishers, ([_, deferred, last]) => last ? Function_dist_effectFunction.pipe(core.deferredInterruptWith(deferred, fiberId), core.asUnit) : core.unit, false)));
|
|
1003
|
+
}
|
|
1004
|
+
handleSurplus(hub, subscribers, elements, isShutdown) {
|
|
1005
|
+
return core.withFiberRuntime(state => {
|
|
1006
|
+
const deferred = core.deferredUnsafeMake(state.id());
|
|
1007
|
+
return Function_dist_effectFunction.pipe(core.suspend(() => {
|
|
1008
|
+
this.unsafeOffer(elements, deferred);
|
|
1009
|
+
this.unsafeOnHubEmptySpace(hub, subscribers);
|
|
1010
|
+
this.unsafeCompleteSubscribers(hub, subscribers);
|
|
1011
|
+
return MutableRef_dist_effectMutableRef.get(isShutdown) ? core.interrupt : core.deferredAwait(deferred);
|
|
1012
|
+
}), core.onInterrupt(() => core.sync(() => this.unsafeRemove(deferred))));
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
unsafeOnHubEmptySpace(hub, subscribers) {
|
|
1016
|
+
let keepPolling = true;
|
|
1017
|
+
while (keepPolling && !hub.isFull()) {
|
|
1018
|
+
const publisher = Function_dist_effectFunction.pipe(this.publishers, MutableQueue_dist_effectMutableQueue.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue));
|
|
1019
|
+
if (publisher === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
|
|
1020
|
+
keepPolling = false;
|
|
1021
|
+
} else {
|
|
1022
|
+
const published = hub.publish(publisher[0]);
|
|
1023
|
+
if (published && publisher[2]) {
|
|
1024
|
+
unsafeCompleteDeferred(publisher[1], true);
|
|
1025
|
+
} else if (!published) {
|
|
1026
|
+
unsafeOfferAll(this.publishers, Function_dist_effectFunction.pipe(unsafePollAllQueue(this.publishers), Chunk_dist_effectChunk.prepend(publisher)));
|
|
1027
|
+
}
|
|
1028
|
+
this.unsafeCompleteSubscribers(hub, subscribers);
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
unsafeCompletePollers(hub, subscribers, subscription, pollers) {
|
|
1033
|
+
return unsafeStrategyCompletePollers(this, hub, subscribers, subscription, pollers);
|
|
1034
|
+
}
|
|
1035
|
+
unsafeCompleteSubscribers(hub, subscribers) {
|
|
1036
|
+
return unsafeStrategyCompleteSubscribers(this, hub, subscribers);
|
|
1037
|
+
}
|
|
1038
|
+
unsafeOffer(elements, deferred) {
|
|
1039
|
+
const iterator = elements[Symbol.iterator]();
|
|
1040
|
+
let next = iterator.next();
|
|
1041
|
+
if (!next.done) {
|
|
1042
|
+
// eslint-disable-next-line no-constant-condition
|
|
1043
|
+
while (1) {
|
|
1044
|
+
const value = next.value;
|
|
1045
|
+
next = iterator.next();
|
|
1046
|
+
if (next.done) {
|
|
1047
|
+
Function_dist_effectFunction.pipe(this.publishers, MutableQueue_dist_effectMutableQueue.offer([value, deferred, true]));
|
|
1048
|
+
break;
|
|
1049
|
+
}
|
|
1050
|
+
Function_dist_effectFunction.pipe(this.publishers, MutableQueue_dist_effectMutableQueue.offer([value, deferred, false]));
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
unsafeRemove(deferred) {
|
|
1055
|
+
unsafeOfferAll(this.publishers, Function_dist_effectFunction.pipe(unsafePollAllQueue(this.publishers), Chunk_dist_effectChunk.filter(([_, a]) => a !== deferred)));
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* A strategy that drops new messages when the hub is at capacity. This
|
|
1061
|
+
* guarantees that a slow subscriber will not slow down the rate at which
|
|
1062
|
+
* messages are published. However, it creates the risk that a slow
|
|
1063
|
+
* subscriber will slow down the rate at which messages are received by
|
|
1064
|
+
* other subscribers and that subscribers may not receive all messages
|
|
1065
|
+
* published to the hub while they are subscribed.
|
|
1066
|
+
*
|
|
1067
|
+
* @internal
|
|
1068
|
+
*/
|
|
1069
|
+
class DroppingStrategy {
|
|
1070
|
+
shutdown() {
|
|
1071
|
+
return core.unit;
|
|
1072
|
+
}
|
|
1073
|
+
handleSurplus(_hub, _subscribers, _elements, _isShutdown) {
|
|
1074
|
+
return core.succeed(false);
|
|
1075
|
+
}
|
|
1076
|
+
unsafeOnHubEmptySpace(_hub, _subscribers) {
|
|
1077
|
+
//
|
|
1078
|
+
}
|
|
1079
|
+
unsafeCompletePollers(hub, subscribers, subscription, pollers) {
|
|
1080
|
+
return unsafeStrategyCompletePollers(this, hub, subscribers, subscription, pollers);
|
|
1081
|
+
}
|
|
1082
|
+
unsafeCompleteSubscribers(hub, subscribers) {
|
|
1083
|
+
return unsafeStrategyCompleteSubscribers(this, hub, subscribers);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* A strategy that adds new messages and drops old messages when the hub is
|
|
1089
|
+
* at capacity. This guarantees that a slow subscriber will not slow down
|
|
1090
|
+
* the rate at which messages are published and received by other
|
|
1091
|
+
* subscribers. However, it creates the risk that a slow subscriber will
|
|
1092
|
+
* not receive some messages published to the hub while it is subscribed.
|
|
1093
|
+
*
|
|
1094
|
+
* @internal
|
|
1095
|
+
*/
|
|
1096
|
+
class SlidingStrategy {
|
|
1097
|
+
shutdown() {
|
|
1098
|
+
return core.unit;
|
|
1099
|
+
}
|
|
1100
|
+
handleSurplus(hub, subscribers, elements, _isShutdown) {
|
|
1101
|
+
return core.sync(() => {
|
|
1102
|
+
this.unsafeSlidingPublish(hub, elements);
|
|
1103
|
+
this.unsafeCompleteSubscribers(hub, subscribers);
|
|
1104
|
+
return true;
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
unsafeOnHubEmptySpace(_hub, _subscribers) {
|
|
1108
|
+
//
|
|
1109
|
+
}
|
|
1110
|
+
unsafeCompletePollers(hub, subscribers, subscription, pollers) {
|
|
1111
|
+
return unsafeStrategyCompletePollers(this, hub, subscribers, subscription, pollers);
|
|
1112
|
+
}
|
|
1113
|
+
unsafeCompleteSubscribers(hub, subscribers) {
|
|
1114
|
+
return unsafeStrategyCompleteSubscribers(this, hub, subscribers);
|
|
1115
|
+
}
|
|
1116
|
+
unsafeSlidingPublish(hub, elements) {
|
|
1117
|
+
const it = elements[Symbol.iterator]();
|
|
1118
|
+
let next = it.next();
|
|
1119
|
+
if (!next.done && hub.capacity > 0) {
|
|
1120
|
+
let a = next.value;
|
|
1121
|
+
let loop = true;
|
|
1122
|
+
while (loop) {
|
|
1123
|
+
hub.slide();
|
|
1124
|
+
const pub = hub.publish(a);
|
|
1125
|
+
if (pub && (next = it.next()) && !next.done) {
|
|
1126
|
+
a = next.value;
|
|
1127
|
+
} else if (pub) {
|
|
1128
|
+
loop = false;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/** @internal */
|
|
1136
|
+
const unsafeStrategyCompletePollers = (strategy, hub, subscribers, subscription, pollers) => {
|
|
1137
|
+
let keepPolling = true;
|
|
1138
|
+
while (keepPolling && !subscription.isEmpty()) {
|
|
1139
|
+
const poller = Function_dist_effectFunction.pipe(pollers, MutableQueue_dist_effectMutableQueue.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue));
|
|
1140
|
+
if (poller === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
|
|
1141
|
+
Function_dist_effectFunction.pipe(subscribers, removeSubscribers(subscription, pollers));
|
|
1142
|
+
if (MutableQueue_dist_effectMutableQueue.isEmpty(pollers)) {
|
|
1143
|
+
keepPolling = false;
|
|
1144
|
+
} else {
|
|
1145
|
+
Function_dist_effectFunction.pipe(subscribers, addSubscribers(subscription, pollers));
|
|
1146
|
+
}
|
|
1147
|
+
} else {
|
|
1148
|
+
const pollResult = subscription.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue);
|
|
1149
|
+
if (pollResult === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
|
|
1150
|
+
unsafeOfferAll(pollers, Function_dist_effectFunction.pipe(unsafePollAllQueue(pollers), Chunk_dist_effectChunk.prepend(poller)));
|
|
1151
|
+
} else {
|
|
1152
|
+
unsafeCompleteDeferred(poller, pollResult);
|
|
1153
|
+
strategy.unsafeOnHubEmptySpace(hub, subscribers);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
/** @internal */
|
|
1160
|
+
const unsafeStrategyCompleteSubscribers = (strategy, hub, subscribers) => {
|
|
1161
|
+
for (const [subscription, pollersSet] of subscribers) {
|
|
1162
|
+
for (const pollers of pollersSet) {
|
|
1163
|
+
strategy.unsafeCompletePollers(hub, subscribers, subscription, pollers);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* @since 2.0.0
|
|
1170
|
+
*/
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* A `Hub<A>` is an asynchronous message hub into which publishers can publish
|
|
1174
|
+
* messages of type `A` and subscribers can subscribe to take messages of type
|
|
1175
|
+
* `A`.
|
|
1176
|
+
*
|
|
1177
|
+
* @since 2.0.0
|
|
1178
|
+
* @category models
|
|
1179
|
+
*/
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* Creates a bounded hub with the back pressure strategy. The hub will retain
|
|
1183
|
+
* messages until they have been taken by all subscribers, applying back
|
|
1184
|
+
* pressure to publishers if the hub is at capacity.
|
|
1185
|
+
*
|
|
1186
|
+
* For best performance use capacities that are powers of two.
|
|
1187
|
+
*
|
|
1188
|
+
* @since 2.0.0
|
|
1189
|
+
* @category constructors
|
|
1190
|
+
*/
|
|
1191
|
+
const bounded = bounded$1;
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* Creates a bounded hub with the dropping strategy. The hub will drop new
|
|
1195
|
+
* messages if the hub is at capacity.
|
|
1196
|
+
*
|
|
1197
|
+
* For best performance use capacities that are powers of two.
|
|
1198
|
+
*
|
|
1199
|
+
* @since 2.0.0
|
|
1200
|
+
* @category constructors
|
|
1201
|
+
*/
|
|
1202
|
+
const dropping = dropping$1;
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* Creates a bounded hub with the sliding strategy. The hub will add new
|
|
1206
|
+
* messages and drop old messages if the hub is at capacity.
|
|
1207
|
+
*
|
|
1208
|
+
* For best performance use capacities that are powers of two.
|
|
1209
|
+
*
|
|
1210
|
+
* @since 2.0.0
|
|
1211
|
+
* @category constructors
|
|
1212
|
+
*/
|
|
1213
|
+
const sliding = sliding$1;
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Creates an unbounded hub.
|
|
1217
|
+
*
|
|
1218
|
+
* @since 2.0.0
|
|
1219
|
+
* @category constructors
|
|
1220
|
+
*/
|
|
1221
|
+
const unbounded = unbounded$1;
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Returns the number of elements the queue can hold.
|
|
1225
|
+
*
|
|
1226
|
+
* @since 2.0.0
|
|
1227
|
+
* @category getters
|
|
1228
|
+
*/
|
|
1229
|
+
const capacity = capacity$1;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Retrieves the size of the queue, which is equal to the number of elements
|
|
1233
|
+
* in the queue. This may be negative if fibers are suspended waiting for
|
|
1234
|
+
* elements to be added to the queue.
|
|
1235
|
+
*
|
|
1236
|
+
* @since 2.0.0
|
|
1237
|
+
* @category getters
|
|
1238
|
+
*/
|
|
1239
|
+
const size = size$1;
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Returns `true` if the `Queue` contains at least one element, `false`
|
|
1243
|
+
* otherwise.
|
|
1244
|
+
*
|
|
1245
|
+
* @since 2.0.0
|
|
1246
|
+
* @category getters
|
|
1247
|
+
*/
|
|
1248
|
+
const isFull = isFull$1;
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* Returns `true` if the `Queue` contains zero elements, `false` otherwise.
|
|
1252
|
+
*
|
|
1253
|
+
* @since 2.0.0
|
|
1254
|
+
* @category getters
|
|
1255
|
+
*/
|
|
1256
|
+
const isEmpty = isEmpty$1;
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* Interrupts any fibers that are suspended on `offer` or `take`. Future calls
|
|
1260
|
+
* to `offer*` and `take*` will be interrupted immediately.
|
|
1261
|
+
*
|
|
1262
|
+
* @since 2.0.0
|
|
1263
|
+
* @category utils
|
|
1264
|
+
*/
|
|
1265
|
+
const shutdown = shutdown$1;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Returns `true` if `shutdown` has been called, otherwise returns `false`.
|
|
1269
|
+
*
|
|
1270
|
+
* @since 2.0.0
|
|
1271
|
+
* @category getters
|
|
1272
|
+
*/
|
|
1273
|
+
const isShutdown = isShutdown$1;
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* Waits until the queue is shutdown. The `Effect` returned by this method will
|
|
1277
|
+
* not resume until the queue has been shutdown. If the queue is already
|
|
1278
|
+
* shutdown, the `Effect` will resume right away.
|
|
1279
|
+
*
|
|
1280
|
+
* @since 2.0.0
|
|
1281
|
+
* @category utils
|
|
1282
|
+
*/
|
|
1283
|
+
const awaitShutdown = awaitShutdown$1;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Publishes a message to the hub, returning whether the message was published
|
|
1287
|
+
* to the hub.
|
|
1288
|
+
*
|
|
1289
|
+
* @since 2.0.0
|
|
1290
|
+
* @category utils
|
|
1291
|
+
*/
|
|
1292
|
+
const publish = publish$1;
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Publishes all of the specified messages to the hub, returning whether they
|
|
1296
|
+
* were published to the hub.
|
|
1297
|
+
*
|
|
1298
|
+
* @since 2.0.0
|
|
1299
|
+
* @category utils
|
|
1300
|
+
*/
|
|
1301
|
+
const publishAll = publishAll$1;
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Subscribes to receive messages from the hub. The resulting subscription can
|
|
1305
|
+
* be evaluated multiple times within the scope to take a message from the hub
|
|
1306
|
+
* each time.
|
|
1307
|
+
*
|
|
1308
|
+
* @since 2.0.0
|
|
1309
|
+
* @category utils
|
|
1310
|
+
*/
|
|
1311
|
+
const subscribe = subscribe$1;
|
|
1312
|
+
|
|
1313
|
+
exports.awaitShutdown = awaitShutdown;
|
|
1314
|
+
exports.bounded = bounded;
|
|
1315
|
+
exports.capacity = capacity;
|
|
1316
|
+
exports.dropping = dropping;
|
|
1317
|
+
exports.isEmpty = isEmpty;
|
|
1318
|
+
exports.isFull = isFull;
|
|
1319
|
+
exports.isShutdown = isShutdown;
|
|
1320
|
+
exports.publish = publish;
|
|
1321
|
+
exports.publishAll = publishAll;
|
|
1322
|
+
exports.shutdown = shutdown;
|
|
1323
|
+
exports.size = size;
|
|
1324
|
+
exports.sliding = sliding;
|
|
1325
|
+
exports.subscribe = subscribe;
|
|
1326
|
+
exports.unbounded = unbounded;
|