@fncts/io 0.0.49 → 0.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (635) hide show
  1. package/Channel/internal/SingleProducerAsyncInput.d.ts +1 -1
  2. package/CountdownLatch.d.ts +5 -5
  3. package/Fiber/FiberRuntime.d.ts +1 -1
  4. package/Hub/api.d.ts +7 -7
  5. package/IO/api/foreachExec.d.ts +18 -0
  6. package/IO/api.d.ts +1 -1
  7. package/Push/Bounds.d.ts +4 -0
  8. package/Push/FlattenStrategy.d.ts +47 -0
  9. package/Push/IndexedBuffer.d.ts +19 -0
  10. package/Push/MergeStrategy.d.ts +19 -0
  11. package/Push/Operator/IOLoopOperator.d.ts +61 -0
  12. package/Push/Operator/IOOperator.d.ts +63 -0
  13. package/Push/Operator/LoopOperator.d.ts +50 -0
  14. package/Push/Operator/SyncOperator.d.ts +41 -0
  15. package/Push/Operator.d.ts +4 -0
  16. package/Push/Producer/IOProducer.d.ts +41 -0
  17. package/Push/Producer/SyncProducer.d.ts +61 -0
  18. package/Push/Producer.d.ts +1 -0
  19. package/Push/Sink.d.ts +65 -0
  20. package/Push/api.d.ts +80 -163
  21. package/Push/definition.d.ts +92 -19
  22. package/Push/internal.d.ts +3 -0
  23. package/Push.d.ts +6 -0
  24. package/Queue/api/dimapIO.d.ts +12 -12
  25. package/Ref/Synchronized/definition.d.ts +32 -9
  26. package/Ref/definition.d.ts +12 -0
  27. package/STM/api.d.ts +1 -1
  28. package/Scope/api.d.ts +16 -1
  29. package/Semaphore/definition.d.ts +1 -1
  30. package/Sink/definition.d.ts +5 -6
  31. package/Subject/Atomic.d.ts +19 -9
  32. package/Subject/DeferredRef.d.ts +17 -0
  33. package/Subject/Hold.d.ts +19 -0
  34. package/Subject/RefSubject/Atomic.d.ts +43 -0
  35. package/Subject/RefSubject/Derived.d.ts +43 -0
  36. package/Subject/RefSubject/RefSubject.d.ts +37 -0
  37. package/Subject/RefSubject/constructors.d.ts +15 -0
  38. package/Subject/RefSubject.d.ts +4 -0
  39. package/Subject/definition.d.ts +14 -2
  40. package/Subject.d.ts +3 -0
  41. package/SubscriptionRef.d.ts +0 -1
  42. package/Supervisor/definition.d.ts +1 -1
  43. package/_cjs/Cached/api.cjs +8 -2
  44. package/_cjs/Cached/api.cjs.map +1 -1
  45. package/_cjs/Cached/definition.cjs +2 -6
  46. package/_cjs/Cached/definition.cjs.map +1 -1
  47. package/_cjs/CancellerState.cjs +4 -7
  48. package/_cjs/CancellerState.cjs.map +1 -1
  49. package/_cjs/Channel/UpstreamPullRequest/definition.cjs +4 -2
  50. package/_cjs/Channel/UpstreamPullRequest/definition.cjs.map +1 -1
  51. package/_cjs/Channel/api.cjs +2 -3
  52. package/_cjs/Channel/api.cjs.map +1 -1
  53. package/_cjs/Channel/definition.cjs +22 -16
  54. package/_cjs/Channel/definition.cjs.map +1 -1
  55. package/_cjs/Channel/internal/ChannelExecutor.cjs +35 -11
  56. package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
  57. package/_cjs/Channel/internal/ChannelState.cjs +15 -8
  58. package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
  59. package/_cjs/Channel/internal/MergeDecision.cjs +6 -8
  60. package/_cjs/Channel/internal/MergeDecision.cjs.map +1 -1
  61. package/_cjs/Channel/internal/MergeState.cjs +7 -3
  62. package/_cjs/Channel/internal/MergeState.cjs.map +1 -1
  63. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +49 -42
  64. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
  65. package/_cjs/Clock/live.cjs +1 -4
  66. package/_cjs/Clock/live.cjs.map +1 -1
  67. package/_cjs/CountdownLatch.cjs +22 -12
  68. package/_cjs/CountdownLatch.cjs.map +1 -1
  69. package/_cjs/Differ/api.cjs +3 -12
  70. package/_cjs/Differ/api.cjs.map +1 -1
  71. package/_cjs/Differ/definition.cjs +1 -5
  72. package/_cjs/Differ/definition.cjs.map +1 -1
  73. package/_cjs/Fiber/FiberMessage.cjs +6 -3
  74. package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
  75. package/_cjs/Fiber/FiberRuntime.cjs +66 -61
  76. package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
  77. package/_cjs/Fiber/definition.cjs +10 -6
  78. package/_cjs/Fiber/definition.cjs.map +1 -1
  79. package/_cjs/FiberDescriptor.cjs +3 -0
  80. package/_cjs/FiberDescriptor.cjs.map +1 -1
  81. package/_cjs/FiberRef/definition.cjs +9 -6
  82. package/_cjs/FiberRef/definition.cjs.map +1 -1
  83. package/_cjs/FiberRefs/Patch.cjs +13 -13
  84. package/_cjs/FiberRefs/Patch.cjs.map +1 -1
  85. package/_cjs/FiberScope/definition.cjs +2 -0
  86. package/_cjs/FiberScope/definition.cjs.map +1 -1
  87. package/_cjs/FiberSet.cjs +4 -3
  88. package/_cjs/FiberSet.cjs.map +1 -1
  89. package/_cjs/FiberStatus/definition.cjs +12 -9
  90. package/_cjs/FiberStatus/definition.cjs.map +1 -1
  91. package/_cjs/Future/State.cjs +8 -7
  92. package/_cjs/Future/State.cjs.map +1 -1
  93. package/_cjs/Future/definition.cjs +3 -3
  94. package/_cjs/Future/definition.cjs.map +1 -1
  95. package/_cjs/Hub/api.cjs +61 -44
  96. package/_cjs/Hub/api.cjs.map +1 -1
  97. package/_cjs/Hub/definition.cjs +4 -8
  98. package/_cjs/Hub/definition.cjs.map +1 -1
  99. package/_cjs/Hub/internal.cjs +130 -110
  100. package/_cjs/Hub/internal.cjs.map +1 -1
  101. package/_cjs/IO/api/foreachExec.cjs +29 -4
  102. package/_cjs/IO/api/foreachExec.cjs.map +1 -1
  103. package/_cjs/IO/api/transplant.cjs +8 -7
  104. package/_cjs/IO/api/transplant.cjs.map +1 -1
  105. package/_cjs/IO/api.cjs +9 -4
  106. package/_cjs/IO/api.cjs.map +1 -1
  107. package/_cjs/IO/definition.cjs +8 -12
  108. package/_cjs/IO/definition.cjs.map +1 -1
  109. package/_cjs/IO/runtime.cjs +64 -61
  110. package/_cjs/IO/runtime.cjs.map +1 -1
  111. package/_cjs/InterruptStatus/definition.cjs +1 -0
  112. package/_cjs/InterruptStatus/definition.cjs.map +1 -1
  113. package/_cjs/Layer/MemoMap.cjs +25 -24
  114. package/_cjs/Layer/MemoMap.cjs.map +1 -1
  115. package/_cjs/Layer/definition.cjs +30 -13
  116. package/_cjs/Layer/definition.cjs.map +1 -1
  117. package/_cjs/LogLevel.cjs +3 -0
  118. package/_cjs/LogLevel.cjs.map +1 -1
  119. package/_cjs/LogSpan.cjs +2 -0
  120. package/_cjs/LogSpan.cjs.map +1 -1
  121. package/_cjs/Logger/definition.cjs +1 -0
  122. package/_cjs/Logger/definition.cjs.map +1 -1
  123. package/_cjs/MVar/definition.cjs +3 -4
  124. package/_cjs/MVar/definition.cjs.map +1 -1
  125. package/_cjs/Push/Bounds.cjs +2 -0
  126. package/_cjs/Push/Bounds.cjs.map +1 -0
  127. package/_cjs/Push/FlattenStrategy.cjs +96 -0
  128. package/_cjs/Push/FlattenStrategy.cjs.map +1 -0
  129. package/_cjs/Push/IndexedBuffer.cjs +74 -0
  130. package/_cjs/Push/IndexedBuffer.cjs.map +1 -0
  131. package/_cjs/Push/MergeStrategy.cjs +47 -0
  132. package/_cjs/Push/MergeStrategy.cjs.map +1 -0
  133. package/_cjs/Push/Operator/IOLoopOperator.cjs +225 -0
  134. package/_cjs/Push/Operator/IOLoopOperator.cjs.map +1 -0
  135. package/_cjs/Push/Operator/IOOperator.cjs +104 -0
  136. package/_cjs/Push/Operator/IOOperator.cjs.map +1 -0
  137. package/_cjs/Push/Operator/LoopOperator.cjs +165 -0
  138. package/_cjs/Push/Operator/LoopOperator.cjs.map +1 -0
  139. package/_cjs/Push/Operator/SyncOperator.cjs +78 -0
  140. package/_cjs/Push/Operator/SyncOperator.cjs.map +1 -0
  141. package/_cjs/Push/Operator.cjs +2 -0
  142. package/_cjs/Push/Operator.cjs.map +1 -0
  143. package/_cjs/Push/Producer/IOProducer.cjs +72 -0
  144. package/_cjs/Push/Producer/IOProducer.cjs.map +1 -0
  145. package/_cjs/Push/Producer/SyncProducer.cjs +111 -0
  146. package/_cjs/Push/Producer/SyncProducer.cjs.map +1 -0
  147. package/_cjs/Push/Producer.cjs +2 -0
  148. package/_cjs/Push/Producer.cjs.map +1 -0
  149. package/_cjs/Push/Sink.cjs +238 -0
  150. package/_cjs/Push/Sink.cjs.map +1 -0
  151. package/_cjs/Push/api.cjs +369 -387
  152. package/_cjs/Push/api.cjs.map +1 -1
  153. package/_cjs/Push/definition.cjs +82 -26
  154. package/_cjs/Push/definition.cjs.map +1 -1
  155. package/_cjs/Push/internal.cjs +31 -26
  156. package/_cjs/Push/internal.cjs.map +1 -1
  157. package/_cjs/Push.cjs +66 -0
  158. package/_cjs/Push.cjs.map +1 -1
  159. package/_cjs/Queue/api/dimapIO.cjs +74 -32
  160. package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
  161. package/_cjs/Queue/api/filterInputIO.cjs +51 -25
  162. package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
  163. package/_cjs/Queue/api/filterOutputIO.cjs +60 -30
  164. package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
  165. package/_cjs/Queue/api/zipWithIO.cjs +27 -10
  166. package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
  167. package/_cjs/Queue/definition.cjs +3 -7
  168. package/_cjs/Queue/definition.cjs.map +1 -1
  169. package/_cjs/Queue/internal.cjs +73 -62
  170. package/_cjs/Queue/internal.cjs.map +1 -1
  171. package/_cjs/Queue/strategy.cjs +1 -3
  172. package/_cjs/Queue/strategy.cjs.map +1 -1
  173. package/_cjs/Random/live.cjs +4 -3
  174. package/_cjs/Random/live.cjs.map +1 -1
  175. package/_cjs/Ref/Atomic.cjs +2 -3
  176. package/_cjs/Ref/Atomic.cjs.map +1 -1
  177. package/_cjs/Ref/Derived.cjs +2 -3
  178. package/_cjs/Ref/Derived.cjs.map +1 -1
  179. package/_cjs/Ref/DerivedAll.cjs +2 -3
  180. package/_cjs/Ref/DerivedAll.cjs.map +1 -1
  181. package/_cjs/Ref/Synchronized/definition.cjs +17 -16
  182. package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
  183. package/_cjs/Ref/definition.cjs +2 -6
  184. package/_cjs/Ref/definition.cjs.map +1 -1
  185. package/_cjs/Reloadable/definition.cjs +2 -0
  186. package/_cjs/Reloadable/definition.cjs.map +1 -1
  187. package/_cjs/STM/definition.cjs +30 -25
  188. package/_cjs/STM/definition.cjs.map +1 -1
  189. package/_cjs/STM/driver.cjs +5 -0
  190. package/_cjs/STM/driver.cjs.map +1 -1
  191. package/_cjs/STM/internal/Entry.cjs +9 -6
  192. package/_cjs/STM/internal/Entry.cjs.map +1 -1
  193. package/_cjs/STM/internal/TryCommit.cjs +6 -7
  194. package/_cjs/STM/internal/TryCommit.cjs.map +1 -1
  195. package/_cjs/STM/internal/Versioned.cjs +2 -3
  196. package/_cjs/STM/internal/Versioned.cjs.map +1 -1
  197. package/_cjs/Schedule/Decision.cjs +3 -4
  198. package/_cjs/Schedule/Decision.cjs.map +1 -1
  199. package/_cjs/Schedule/Driver.cjs +4 -0
  200. package/_cjs/Schedule/Driver.cjs.map +1 -1
  201. package/_cjs/Schedule/api.cjs +2 -5
  202. package/_cjs/Schedule/api.cjs.map +1 -1
  203. package/_cjs/Schedule/definition.cjs +3 -1
  204. package/_cjs/Schedule/definition.cjs.map +1 -1
  205. package/_cjs/Scope/ReleaseMap/definition.cjs +8 -2
  206. package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
  207. package/_cjs/Scope/api.cjs +29 -11
  208. package/_cjs/Scope/api.cjs.map +1 -1
  209. package/_cjs/Scope/definition.cjs +3 -7
  210. package/_cjs/Scope/definition.cjs.map +1 -1
  211. package/_cjs/ScopedRef/api.cjs +8 -3
  212. package/_cjs/ScopedRef/api.cjs.map +1 -1
  213. package/_cjs/ScopedRef/definition.cjs +1 -5
  214. package/_cjs/ScopedRef/definition.cjs.map +1 -1
  215. package/_cjs/Semaphore/Reservation.cjs +2 -0
  216. package/_cjs/Semaphore/Reservation.cjs.map +1 -1
  217. package/_cjs/Semaphore/definition.cjs +42 -38
  218. package/_cjs/Semaphore/definition.cjs.map +1 -1
  219. package/_cjs/Sink/definition.cjs +3 -3
  220. package/_cjs/Sink/definition.cjs.map +1 -1
  221. package/_cjs/State/api.cjs +1 -4
  222. package/_cjs/State/api.cjs.map +1 -1
  223. package/_cjs/State/definition.cjs +2 -6
  224. package/_cjs/State/definition.cjs.map +1 -1
  225. package/_cjs/State/internal.cjs +1 -5
  226. package/_cjs/State/internal.cjs.map +1 -1
  227. package/_cjs/Stream/api/zipAllWith.cjs +7 -11
  228. package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
  229. package/_cjs/Stream/api/zipWithChunks.cjs +5 -5
  230. package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
  231. package/_cjs/Stream/api.cjs +8 -7
  232. package/_cjs/Stream/api.cjs.map +1 -1
  233. package/_cjs/Stream/definition.cjs +3 -4
  234. package/_cjs/Stream/definition.cjs.map +1 -1
  235. package/_cjs/Stream/internal/DebounceState.cjs +5 -5
  236. package/_cjs/Stream/internal/DebounceState.cjs.map +1 -1
  237. package/_cjs/Stream/internal/Handoff.cjs +18 -17
  238. package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
  239. package/_cjs/Stream/internal/SinkEndReason.cjs +5 -12
  240. package/_cjs/Stream/internal/SinkEndReason.cjs.map +1 -1
  241. package/_cjs/Stream/internal/Take.cjs +3 -0
  242. package/_cjs/Stream/internal/Take.cjs.map +1 -1
  243. package/_cjs/Subject/Atomic.cjs +45 -15
  244. package/_cjs/Subject/Atomic.cjs.map +1 -1
  245. package/_cjs/Subject/DeferredRef.cjs +56 -0
  246. package/_cjs/Subject/DeferredRef.cjs.map +1 -0
  247. package/_cjs/Subject/Hold.cjs +38 -0
  248. package/_cjs/Subject/Hold.cjs.map +1 -0
  249. package/_cjs/Subject/RefSubject/Atomic.cjs +171 -0
  250. package/_cjs/Subject/RefSubject/Atomic.cjs.map +1 -0
  251. package/_cjs/Subject/RefSubject/Derived.cjs +103 -0
  252. package/_cjs/Subject/RefSubject/Derived.cjs.map +1 -0
  253. package/_cjs/Subject/RefSubject/RefSubject.cjs +18 -0
  254. package/_cjs/Subject/RefSubject/RefSubject.cjs.map +1 -0
  255. package/_cjs/Subject/RefSubject/constructors.cjs +30 -0
  256. package/_cjs/Subject/RefSubject/constructors.cjs.map +1 -0
  257. package/_cjs/Subject/RefSubject.cjs +2 -0
  258. package/_cjs/Subject/RefSubject.cjs.map +1 -0
  259. package/_cjs/Subject/definition.cjs +11 -1
  260. package/_cjs/Subject/definition.cjs.map +1 -1
  261. package/_cjs/Subject.cjs +33 -0
  262. package/_cjs/Subject.cjs.map +1 -1
  263. package/_cjs/SubscriptionRef.cjs +4 -5
  264. package/_cjs/SubscriptionRef.cjs.map +1 -1
  265. package/_cjs/Supervisor/constructors.cjs +3 -11
  266. package/_cjs/Supervisor/constructors.cjs.map +1 -1
  267. package/_cjs/Supervisor/definition.cjs +10 -4
  268. package/_cjs/Supervisor/definition.cjs.map +1 -1
  269. package/_cjs/SupervisorPatch.cjs +9 -12
  270. package/_cjs/SupervisorPatch.cjs.map +1 -1
  271. package/_cjs/TExit/definition.cjs +19 -18
  272. package/_cjs/TExit/definition.cjs.map +1 -1
  273. package/_cjs/TReentrantLock/definition.cjs +8 -3
  274. package/_cjs/TReentrantLock/definition.cjs.map +1 -1
  275. package/_cjs/TRef/definition.cjs +6 -6
  276. package/_cjs/TRef/definition.cjs.map +1 -1
  277. package/_cjs/internal/BackgroundScheduler.cjs +16 -16
  278. package/_cjs/internal/BackgroundScheduler.cjs.map +1 -1
  279. package/_cjs/internal/HashedPair.cjs +2 -0
  280. package/_cjs/internal/HashedPair.cjs.map +1 -1
  281. package/_cjs/internal/Hub.cjs +39 -15
  282. package/_cjs/internal/Hub.cjs.map +1 -1
  283. package/_cjs/internal/IsFatal.cjs +7 -11
  284. package/_cjs/internal/IsFatal.cjs.map +1 -1
  285. package/_cjs/internal/MutableQueue.cjs +14 -11
  286. package/_cjs/internal/MutableQueue.cjs.map +1 -1
  287. package/_cjs/internal/Scheduler.cjs +4 -8
  288. package/_cjs/internal/Scheduler.cjs.map +1 -1
  289. package/_cjs/internal/StackTraceBuilder.cjs +2 -4
  290. package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
  291. package/_mjs/Cached/api.mjs +8 -2
  292. package/_mjs/Cached/api.mjs.map +1 -1
  293. package/_mjs/Cached/definition.mjs +1 -5
  294. package/_mjs/Cached/definition.mjs.map +1 -1
  295. package/_mjs/CancellerState.mjs +4 -7
  296. package/_mjs/CancellerState.mjs.map +1 -1
  297. package/_mjs/Channel/UpstreamPullRequest/definition.mjs +4 -2
  298. package/_mjs/Channel/UpstreamPullRequest/definition.mjs.map +1 -1
  299. package/_mjs/Channel/api.mjs +2 -3
  300. package/_mjs/Channel/api.mjs.map +1 -1
  301. package/_mjs/Channel/definition.mjs +21 -15
  302. package/_mjs/Channel/definition.mjs.map +1 -1
  303. package/_mjs/Channel/internal/ChannelExecutor.mjs +35 -11
  304. package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
  305. package/_mjs/Channel/internal/ChannelState.mjs +15 -8
  306. package/_mjs/Channel/internal/ChannelState.mjs.map +1 -1
  307. package/_mjs/Channel/internal/MergeDecision.mjs +5 -7
  308. package/_mjs/Channel/internal/MergeDecision.mjs.map +1 -1
  309. package/_mjs/Channel/internal/MergeState.mjs +7 -3
  310. package/_mjs/Channel/internal/MergeState.mjs.map +1 -1
  311. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +49 -42
  312. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
  313. package/_mjs/Clock/live.mjs +1 -4
  314. package/_mjs/Clock/live.mjs.map +1 -1
  315. package/_mjs/CountdownLatch.mjs +21 -11
  316. package/_mjs/CountdownLatch.mjs.map +1 -1
  317. package/_mjs/Differ/api.mjs +3 -12
  318. package/_mjs/Differ/api.mjs.map +1 -1
  319. package/_mjs/Differ/definition.mjs +1 -5
  320. package/_mjs/Differ/definition.mjs.map +1 -1
  321. package/_mjs/Fiber/FiberMessage.mjs +6 -3
  322. package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
  323. package/_mjs/Fiber/FiberRuntime.mjs +66 -61
  324. package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
  325. package/_mjs/Fiber/definition.mjs +9 -5
  326. package/_mjs/Fiber/definition.mjs.map +1 -1
  327. package/_mjs/FiberDescriptor.mjs +3 -0
  328. package/_mjs/FiberDescriptor.mjs.map +1 -1
  329. package/_mjs/FiberRef/definition.mjs +9 -6
  330. package/_mjs/FiberRef/definition.mjs.map +1 -1
  331. package/_mjs/FiberRefs/Patch.mjs +13 -13
  332. package/_mjs/FiberRefs/Patch.mjs.map +1 -1
  333. package/_mjs/FiberScope/definition.mjs +2 -0
  334. package/_mjs/FiberScope/definition.mjs.map +1 -1
  335. package/_mjs/FiberSet.mjs +4 -3
  336. package/_mjs/FiberSet.mjs.map +1 -1
  337. package/_mjs/FiberStatus/definition.mjs +12 -9
  338. package/_mjs/FiberStatus/definition.mjs.map +1 -1
  339. package/_mjs/Future/State.mjs +8 -7
  340. package/_mjs/Future/State.mjs.map +1 -1
  341. package/_mjs/Future/definition.mjs +3 -3
  342. package/_mjs/Future/definition.mjs.map +1 -1
  343. package/_mjs/Hub/api.mjs +61 -44
  344. package/_mjs/Hub/api.mjs.map +1 -1
  345. package/_mjs/Hub/definition.mjs +3 -7
  346. package/_mjs/Hub/definition.mjs.map +1 -1
  347. package/_mjs/Hub/internal.mjs +130 -110
  348. package/_mjs/Hub/internal.mjs.map +1 -1
  349. package/_mjs/IO/api/foreachExec.mjs +27 -4
  350. package/_mjs/IO/api/foreachExec.mjs.map +1 -1
  351. package/_mjs/IO/api/transplant.mjs +8 -7
  352. package/_mjs/IO/api/transplant.mjs.map +1 -1
  353. package/_mjs/IO/api.mjs +9 -4
  354. package/_mjs/IO/api.mjs.map +1 -1
  355. package/_mjs/IO/definition.mjs +7 -11
  356. package/_mjs/IO/definition.mjs.map +1 -1
  357. package/_mjs/IO/runtime.mjs +64 -61
  358. package/_mjs/IO/runtime.mjs.map +1 -1
  359. package/_mjs/InterruptStatus/definition.mjs +1 -0
  360. package/_mjs/InterruptStatus/definition.mjs.map +1 -1
  361. package/_mjs/Layer/MemoMap.mjs +25 -24
  362. package/_mjs/Layer/MemoMap.mjs.map +1 -1
  363. package/_mjs/Layer/definition.mjs +29 -12
  364. package/_mjs/Layer/definition.mjs.map +1 -1
  365. package/_mjs/LogLevel.mjs +3 -0
  366. package/_mjs/LogLevel.mjs.map +1 -1
  367. package/_mjs/LogSpan.mjs +2 -0
  368. package/_mjs/LogSpan.mjs.map +1 -1
  369. package/_mjs/Logger/definition.mjs +1 -0
  370. package/_mjs/Logger/definition.mjs.map +1 -1
  371. package/_mjs/MVar/definition.mjs +2 -3
  372. package/_mjs/MVar/definition.mjs.map +1 -1
  373. package/_mjs/Push/Bounds.mjs +2 -0
  374. package/_mjs/Push/Bounds.mjs.map +1 -0
  375. package/_mjs/Push/FlattenStrategy.mjs +87 -0
  376. package/_mjs/Push/FlattenStrategy.mjs.map +1 -0
  377. package/_mjs/Push/IndexedBuffer.mjs +65 -0
  378. package/_mjs/Push/IndexedBuffer.mjs.map +1 -0
  379. package/_mjs/Push/MergeStrategy.mjs +36 -0
  380. package/_mjs/Push/MergeStrategy.mjs.map +1 -0
  381. package/_mjs/Push/Operator/IOLoopOperator.mjs +208 -0
  382. package/_mjs/Push/Operator/IOLoopOperator.mjs.map +1 -0
  383. package/_mjs/Push/Operator/IOOperator.mjs +91 -0
  384. package/_mjs/Push/Operator/IOOperator.mjs.map +1 -0
  385. package/_mjs/Push/Operator/LoopOperator.mjs +151 -0
  386. package/_mjs/Push/Operator/LoopOperator.mjs.map +1 -0
  387. package/_mjs/Push/Operator/SyncOperator.mjs +67 -0
  388. package/_mjs/Push/Operator/SyncOperator.mjs.map +1 -0
  389. package/_mjs/Push/Operator.mjs +2 -0
  390. package/_mjs/Push/Operator.mjs.map +1 -0
  391. package/_mjs/Push/Producer/IOProducer.mjs +60 -0
  392. package/_mjs/Push/Producer/IOProducer.mjs.map +1 -0
  393. package/_mjs/Push/Producer/SyncProducer.mjs +94 -0
  394. package/_mjs/Push/Producer/SyncProducer.mjs.map +1 -0
  395. package/_mjs/Push/Producer.mjs +2 -0
  396. package/_mjs/Push/Producer.mjs.map +1 -0
  397. package/_mjs/Push/Sink.mjs +225 -0
  398. package/_mjs/Push/Sink.mjs.map +1 -0
  399. package/_mjs/Push/api.mjs +340 -348
  400. package/_mjs/Push/api.mjs.map +1 -1
  401. package/_mjs/Push/definition.mjs +75 -21
  402. package/_mjs/Push/definition.mjs.map +1 -1
  403. package/_mjs/Push/internal.mjs +30 -26
  404. package/_mjs/Push/internal.mjs.map +1 -1
  405. package/_mjs/Push.mjs +7 -1
  406. package/_mjs/Push.mjs.map +1 -1
  407. package/_mjs/Queue/api/dimapIO.mjs +74 -32
  408. package/_mjs/Queue/api/dimapIO.mjs.map +1 -1
  409. package/_mjs/Queue/api/filterInputIO.mjs +51 -25
  410. package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
  411. package/_mjs/Queue/api/filterOutputIO.mjs +60 -30
  412. package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
  413. package/_mjs/Queue/api/zipWithIO.mjs +27 -10
  414. package/_mjs/Queue/api/zipWithIO.mjs.map +1 -1
  415. package/_mjs/Queue/definition.mjs +3 -7
  416. package/_mjs/Queue/definition.mjs.map +1 -1
  417. package/_mjs/Queue/internal.mjs +73 -62
  418. package/_mjs/Queue/internal.mjs.map +1 -1
  419. package/_mjs/Queue/strategy.mjs +1 -3
  420. package/_mjs/Queue/strategy.mjs.map +1 -1
  421. package/_mjs/Random/live.mjs +4 -3
  422. package/_mjs/Random/live.mjs.map +1 -1
  423. package/_mjs/Ref/Atomic.mjs +2 -3
  424. package/_mjs/Ref/Atomic.mjs.map +1 -1
  425. package/_mjs/Ref/Derived.mjs +2 -3
  426. package/_mjs/Ref/Derived.mjs.map +1 -1
  427. package/_mjs/Ref/DerivedAll.mjs +2 -3
  428. package/_mjs/Ref/DerivedAll.mjs.map +1 -1
  429. package/_mjs/Ref/Synchronized/definition.mjs +16 -15
  430. package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
  431. package/_mjs/Ref/definition.mjs +1 -5
  432. package/_mjs/Ref/definition.mjs.map +1 -1
  433. package/_mjs/Reloadable/definition.mjs +2 -0
  434. package/_mjs/Reloadable/definition.mjs.map +1 -1
  435. package/_mjs/STM/definition.mjs +29 -24
  436. package/_mjs/STM/definition.mjs.map +1 -1
  437. package/_mjs/STM/driver.mjs +5 -0
  438. package/_mjs/STM/driver.mjs.map +1 -1
  439. package/_mjs/STM/internal/Entry.mjs +8 -5
  440. package/_mjs/STM/internal/Entry.mjs.map +1 -1
  441. package/_mjs/STM/internal/TryCommit.mjs +6 -7
  442. package/_mjs/STM/internal/TryCommit.mjs.map +1 -1
  443. package/_mjs/STM/internal/Versioned.mjs +2 -3
  444. package/_mjs/STM/internal/Versioned.mjs.map +1 -1
  445. package/_mjs/Schedule/Decision.mjs +3 -4
  446. package/_mjs/Schedule/Decision.mjs.map +1 -1
  447. package/_mjs/Schedule/Driver.mjs +4 -0
  448. package/_mjs/Schedule/Driver.mjs.map +1 -1
  449. package/_mjs/Schedule/api.mjs +2 -5
  450. package/_mjs/Schedule/api.mjs.map +1 -1
  451. package/_mjs/Schedule/definition.mjs +3 -1
  452. package/_mjs/Schedule/definition.mjs.map +1 -1
  453. package/_mjs/Scope/ReleaseMap/definition.mjs +8 -2
  454. package/_mjs/Scope/ReleaseMap/definition.mjs.map +1 -1
  455. package/_mjs/Scope/api.mjs +23 -8
  456. package/_mjs/Scope/api.mjs.map +1 -1
  457. package/_mjs/Scope/definition.mjs +2 -6
  458. package/_mjs/Scope/definition.mjs.map +1 -1
  459. package/_mjs/ScopedRef/api.mjs +8 -3
  460. package/_mjs/ScopedRef/api.mjs.map +1 -1
  461. package/_mjs/ScopedRef/definition.mjs +1 -5
  462. package/_mjs/ScopedRef/definition.mjs.map +1 -1
  463. package/_mjs/Semaphore/Reservation.mjs +2 -0
  464. package/_mjs/Semaphore/Reservation.mjs.map +1 -1
  465. package/_mjs/Semaphore/definition.mjs +42 -38
  466. package/_mjs/Semaphore/definition.mjs.map +1 -1
  467. package/_mjs/Sink/definition.mjs +3 -3
  468. package/_mjs/Sink/definition.mjs.map +1 -1
  469. package/_mjs/State/api.mjs +1 -4
  470. package/_mjs/State/api.mjs.map +1 -1
  471. package/_mjs/State/definition.mjs +1 -5
  472. package/_mjs/State/definition.mjs.map +1 -1
  473. package/_mjs/State/internal.mjs +1 -5
  474. package/_mjs/State/internal.mjs.map +1 -1
  475. package/_mjs/Stream/api/zipAllWith.mjs +7 -11
  476. package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
  477. package/_mjs/Stream/api/zipWithChunks.mjs +5 -5
  478. package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
  479. package/_mjs/Stream/api.mjs +8 -7
  480. package/_mjs/Stream/api.mjs.map +1 -1
  481. package/_mjs/Stream/definition.mjs +2 -3
  482. package/_mjs/Stream/definition.mjs.map +1 -1
  483. package/_mjs/Stream/internal/DebounceState.mjs +5 -5
  484. package/_mjs/Stream/internal/DebounceState.mjs.map +1 -1
  485. package/_mjs/Stream/internal/Handoff.mjs +17 -16
  486. package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
  487. package/_mjs/Stream/internal/SinkEndReason.mjs +4 -11
  488. package/_mjs/Stream/internal/SinkEndReason.mjs.map +1 -1
  489. package/_mjs/Stream/internal/Take.mjs +3 -0
  490. package/_mjs/Stream/internal/Take.mjs.map +1 -1
  491. package/_mjs/Subject/Atomic.mjs +46 -15
  492. package/_mjs/Subject/Atomic.mjs.map +1 -1
  493. package/_mjs/Subject/DeferredRef.mjs +48 -0
  494. package/_mjs/Subject/DeferredRef.mjs.map +1 -0
  495. package/_mjs/Subject/Hold.mjs +30 -0
  496. package/_mjs/Subject/Hold.mjs.map +1 -0
  497. package/_mjs/Subject/RefSubject/Atomic.mjs +163 -0
  498. package/_mjs/Subject/RefSubject/Atomic.mjs.map +1 -0
  499. package/_mjs/Subject/RefSubject/Derived.mjs +95 -0
  500. package/_mjs/Subject/RefSubject/Derived.mjs.map +1 -0
  501. package/_mjs/Subject/RefSubject/RefSubject.mjs +11 -0
  502. package/_mjs/Subject/RefSubject/RefSubject.mjs.map +1 -0
  503. package/_mjs/Subject/RefSubject/constructors.mjs +23 -0
  504. package/_mjs/Subject/RefSubject/constructors.mjs.map +1 -0
  505. package/_mjs/Subject/RefSubject.mjs +2 -0
  506. package/_mjs/Subject/RefSubject.mjs.map +1 -0
  507. package/_mjs/Subject/definition.mjs +9 -0
  508. package/_mjs/Subject/definition.mjs.map +1 -1
  509. package/_mjs/Subject.mjs +3 -0
  510. package/_mjs/Subject.mjs.map +1 -1
  511. package/_mjs/SubscriptionRef.mjs +4 -5
  512. package/_mjs/SubscriptionRef.mjs.map +1 -1
  513. package/_mjs/Supervisor/constructors.mjs +3 -11
  514. package/_mjs/Supervisor/constructors.mjs.map +1 -1
  515. package/_mjs/Supervisor/definition.mjs +10 -4
  516. package/_mjs/Supervisor/definition.mjs.map +1 -1
  517. package/_mjs/SupervisorPatch.mjs +9 -12
  518. package/_mjs/SupervisorPatch.mjs.map +1 -1
  519. package/_mjs/TExit/definition.mjs +19 -18
  520. package/_mjs/TExit/definition.mjs.map +1 -1
  521. package/_mjs/TReentrantLock/definition.mjs +8 -3
  522. package/_mjs/TReentrantLock/definition.mjs.map +1 -1
  523. package/_mjs/TRef/definition.mjs +6 -6
  524. package/_mjs/TRef/definition.mjs.map +1 -1
  525. package/_mjs/internal/BackgroundScheduler.mjs +16 -16
  526. package/_mjs/internal/BackgroundScheduler.mjs.map +1 -1
  527. package/_mjs/internal/HashedPair.mjs +2 -0
  528. package/_mjs/internal/HashedPair.mjs.map +1 -1
  529. package/_mjs/internal/Hub.mjs +39 -15
  530. package/_mjs/internal/Hub.mjs.map +1 -1
  531. package/_mjs/internal/IsFatal.mjs +7 -11
  532. package/_mjs/internal/IsFatal.mjs.map +1 -1
  533. package/_mjs/internal/MutableQueue.mjs +14 -11
  534. package/_mjs/internal/MutableQueue.mjs.map +1 -1
  535. package/_mjs/internal/Scheduler.mjs +4 -8
  536. package/_mjs/internal/Scheduler.mjs.map +1 -1
  537. package/_mjs/internal/StackTraceBuilder.mjs +2 -4
  538. package/_mjs/internal/StackTraceBuilder.mjs.map +1 -1
  539. package/_src/Cached/api.ts +8 -2
  540. package/_src/Channel/internal/SingleProducerAsyncInput.ts +6 -4
  541. package/_src/CountdownLatch.ts +24 -13
  542. package/_src/Fiber/FiberRuntime.ts +4 -2
  543. package/_src/FiberRef/definition.ts +1 -1
  544. package/_src/Hub/api.ts +85 -54
  545. package/_src/Hub/internal.ts +36 -20
  546. package/_src/IO/api/foreachExec.ts +47 -0
  547. package/_src/IO/api.ts +0 -5
  548. package/_src/Push/Bounds.ts +4 -0
  549. package/_src/Push/FlattenStrategy.ts +137 -0
  550. package/_src/Push/IndexedBuffer.ts +79 -0
  551. package/_src/Push/MergeStrategy.ts +59 -0
  552. package/_src/Push/Operator/IOLoopOperator.ts +413 -0
  553. package/_src/Push/Operator/IOOperator.ts +173 -0
  554. package/_src/Push/Operator/LoopOperator.ts +242 -0
  555. package/_src/Push/Operator/SyncOperator.ts +107 -0
  556. package/_src/Push/Operator.ts +7 -0
  557. package/_src/Push/Producer/IOProducer.ts +83 -0
  558. package/_src/Push/Producer/SyncProducer.ts +105 -0
  559. package/_src/Push/Producer.ts +0 -0
  560. package/_src/Push/Sink.ts +302 -0
  561. package/_src/Push/api.ts +389 -515
  562. package/_src/Push/definition.ts +216 -23
  563. package/_src/Push/internal.ts +11 -0
  564. package/_src/Push.ts +7 -1
  565. package/_src/Queue/api/dimapIO.ts +57 -19
  566. package/_src/Queue/api/filterInputIO.ts +36 -12
  567. package/_src/Queue/api/filterOutputIO.ts +42 -18
  568. package/_src/Queue/api/zipWithIO.ts +23 -11
  569. package/_src/Queue/internal.ts +9 -3
  570. package/_src/Ref/Synchronized/definition.ts +81 -37
  571. package/_src/Ref/definition.ts +26 -0
  572. package/_src/Schedule/api.ts +1 -1
  573. package/_src/Scope/api.ts +22 -0
  574. package/_src/ScopedRef/api.ts +6 -2
  575. package/_src/Semaphore/definition.ts +4 -2
  576. package/_src/Sink/definition.ts +4 -5
  577. package/_src/Stream/api.ts +0 -2
  578. package/_src/Stream/definition.ts +0 -1
  579. package/_src/Subject/Atomic.ts +68 -11
  580. package/_src/Subject/DeferredRef.ts +44 -0
  581. package/_src/Subject/Hold.ts +48 -0
  582. package/_src/Subject/RefSubject/Atomic.ts +233 -0
  583. package/_src/Subject/RefSubject/Derived.ts +184 -0
  584. package/_src/Subject/RefSubject/RefSubject.ts +100 -0
  585. package/_src/Subject/RefSubject/constructors.ts +27 -0
  586. package/_src/Subject/RefSubject.ts +7 -0
  587. package/_src/Subject/definition.ts +21 -3
  588. package/_src/Subject.ts +6 -3
  589. package/_src/SubscriptionRef.ts +1 -1
  590. package/_src/Supervisor/constructors.ts +0 -2
  591. package/_src/Supervisor/definition.ts +2 -1
  592. package/_src/TReentrantLock/api.ts +1 -1
  593. package/_src/global.ts +8 -0
  594. package/_src/index.ts +49 -50
  595. package/_src/internal/MutableQueue.ts +5 -3
  596. package/global.d.ts +8 -0
  597. package/index.d.ts +0 -1
  598. package/internal/MutableQueue.d.ts +2 -2
  599. package/package.json +4 -4
  600. package/RefSubject/Atomic.d.ts +0 -34
  601. package/RefSubject/Synchronized/api.d.ts +0 -9
  602. package/RefSubject/Synchronized/definition.d.ts +0 -39
  603. package/RefSubject/api.d.ts +0 -120
  604. package/RefSubject/definition.d.ts +0 -52
  605. package/RefSubject.d.ts +0 -3
  606. package/_cjs/RefSubject/Atomic.cjs +0 -107
  607. package/_cjs/RefSubject/Atomic.cjs.map +0 -1
  608. package/_cjs/RefSubject/Synchronized/api.cjs +0 -22
  609. package/_cjs/RefSubject/Synchronized/api.cjs.map +0 -1
  610. package/_cjs/RefSubject/Synchronized/definition.cjs +0 -55
  611. package/_cjs/RefSubject/Synchronized/definition.cjs.map +0 -1
  612. package/_cjs/RefSubject/api.cjs +0 -251
  613. package/_cjs/RefSubject/api.cjs.map +0 -1
  614. package/_cjs/RefSubject/definition.cjs +0 -26
  615. package/_cjs/RefSubject/definition.cjs.map +0 -1
  616. package/_cjs/RefSubject.cjs +0 -39
  617. package/_cjs/RefSubject.cjs.map +0 -1
  618. package/_mjs/RefSubject/Atomic.mjs +0 -99
  619. package/_mjs/RefSubject/Atomic.mjs.map +0 -1
  620. package/_mjs/RefSubject/Synchronized/api.mjs +0 -15
  621. package/_mjs/RefSubject/Synchronized/api.mjs.map +0 -1
  622. package/_mjs/RefSubject/Synchronized/definition.mjs +0 -47
  623. package/_mjs/RefSubject/Synchronized/definition.mjs.map +0 -1
  624. package/_mjs/RefSubject/api.mjs +0 -229
  625. package/_mjs/RefSubject/api.mjs.map +0 -1
  626. package/_mjs/RefSubject/definition.mjs +0 -19
  627. package/_mjs/RefSubject/definition.mjs.map +0 -1
  628. package/_mjs/RefSubject.mjs +0 -5
  629. package/_mjs/RefSubject.mjs.map +0 -1
  630. package/_src/RefSubject/Atomic.ts +0 -129
  631. package/_src/RefSubject/Synchronized/api.ts +0 -14
  632. package/_src/RefSubject/Synchronized/definition.ts +0 -76
  633. package/_src/RefSubject/api.ts +0 -253
  634. package/_src/RefSubject/definition.ts +0 -70
  635. package/_src/RefSubject.ts +0 -5
@@ -1,53 +1,246 @@
1
+ import type { Sink as Sink_, UnsafeSink, UnsafeSink as UnsafeSink_ } from "./Sink.js";
2
+ import type { FlattenStrategy } from "@fncts/io/Push/FlattenStrategy";
3
+ import type { IOProducer } from "@fncts/io/Push/Producer/IOProducer";
4
+
5
+ import { type SyncProducer } from "@fncts/io/Push/Producer/SyncProducer";
6
+
7
+ import { Sink } from "./Sink.js";
8
+
1
9
  export const PushVariance = Symbol.for("fncts.io.Push.Variance");
2
10
  export type PushVariance = typeof PushVariance;
3
11
 
4
12
  export const PushTypeId = Symbol.for("fncts.io.Push");
5
13
  export type PushTypeId = typeof PushTypeId;
6
14
 
15
+ export const enum PushTag {
16
+ Defer,
17
+ ProducerSync,
18
+ ProducerIO,
19
+ FailCause,
20
+ OnSuccess,
21
+ OnSuccessWithStrategy,
22
+ OnSuccessAndFailure,
23
+ External,
24
+ FromPush,
25
+ Transform,
26
+ }
27
+
7
28
  /**
8
29
  * @tsplus type fncts.io.Push
9
30
  * @tsplus companion fncts.io.PushOps
10
31
  */
11
- export class Push<R, E, A> {
12
- readonly [PushTypeId]: PushTypeId = PushTypeId;
32
+ export abstract class Push<R, E, A> {
33
+ readonly [PushTypeId]: PushTypeId = PushTypeId;
34
+ readonly _pushOpCode: PushTag | null = null;
35
+
13
36
  declare [PushVariance]: {
14
37
  readonly _R: (_: never) => R;
15
38
  readonly _E: (_: never) => E;
16
39
  readonly _A: (_: never) => A;
17
40
  };
18
- constructor(readonly run: <R1>(emitter: Sink<R1, E, A>) => IO<R | R1, never, unknown>) {}
41
+
42
+ constructor() {
43
+ this.run = this.run.bind(this);
44
+ }
45
+
46
+ run<R1>(sink: UnsafeSink<R1, E, A>): IO<R | R1, never, void> {
47
+ return this.unsafeRun(sink);
48
+ }
19
49
  }
20
50
 
21
51
  export declare namespace Push {
52
+ export type Run<R, E, A> = <R1>(emitter: UnsafeSink<R1, E, A>) => IO<R | R1, never, unknown>;
22
53
  export type EnvironmentOf<X> = [X] extends [{ [PushVariance]: { readonly _R: (_: never) => infer R } }] ? R : never;
23
54
  export type ErrorOf<X> = [X] extends [{ [PushVariance]: { readonly _E: (_: never) => infer E } }] ? E : never;
24
55
  export type ValueOf<X> = [X] extends [{ [PushVariance]: { readonly _A: (_: never) => infer A } }] ? A : never;
56
+ export type Sink<Env, R, E, A> = Sink_<Env, R, E, A>;
57
+ export type UnsafeSink<R, E, A> = UnsafeSink_<R, E, A>;
25
58
  }
26
59
 
27
60
  /**
28
- * @tsplus type fncts.io.Push.Sink
29
- * @tsplus companion fncts.io.Push.SinkOps
61
+ * @tsplus pipeable fncts.io.Push unsafeRun
30
62
  */
31
- export class Sink<R, E, A> {
32
- constructor(
33
- readonly event: (value: A) => IO<R, never, void>,
34
- readonly error: (cause: Cause<E>) => IO<R, never, void>,
35
- ) {}
63
+ export function unsafeRun<E, A, R1>(sink: UnsafeSink<R1, E, A>) {
64
+ return <R>(push: Push<R, E, A>): IO<R | R1, never, void> => unsafeRunPush(push, sink);
36
65
  }
37
66
 
38
- /**
39
- * @tsplus static fncts.io.PushOps __call
40
- */
41
- export function makePush<R, E, A>(run: <R1>(sink: Sink<R1, E, A>) => IO<R | R1, never, unknown>): Push<R, E, A> {
42
- return new Push(run);
67
+ export type PushOp<Tag extends string | number | null, Body = {}> = Push<never, any, any> &
68
+ Body & {
69
+ readonly _pushOpCode: Tag;
70
+ };
71
+
72
+ export class PushPrimitive extends Push<never, any, any> {
73
+ public i0: any = undefined;
74
+ public i1: any = undefined;
75
+ public i2: any = undefined;
76
+ public i3: any = undefined;
77
+ public i4: any = undefined;
78
+ public trace: string | undefined = undefined;
79
+ constructor(readonly _pushOpCode: PushTag | null) {
80
+ super();
81
+ }
43
82
  }
44
83
 
45
- /**
46
- * @tsplus static fncts.io.Push.SinkOps __call
47
- */
48
- export function makeSink<R, E, A>(
49
- value: (value: A) => IO<R, never, unknown>,
50
- error: (cause: Cause<E>) => IO<R, never, unknown>,
51
- ): Sink<R, E, A> {
52
- return new Sink(value, error);
84
+ export interface Base<R = never, E = any, A = any>
85
+ extends PushOp<
86
+ null,
87
+ {
88
+ readonly run: Push.Run<R, E, A>;
89
+ }
90
+ > {}
91
+
92
+ export interface Defer
93
+ extends PushOp<
94
+ PushTag.Defer,
95
+ {
96
+ readonly i0: () => Primitive;
97
+ }
98
+ > {}
99
+
100
+ export interface FromPush<R = never, E = any, A = any>
101
+ extends PushOp<
102
+ PushTag.FromPush,
103
+ {
104
+ readonly i0: Push.Run<R, E, A>;
105
+ }
106
+ > {}
107
+
108
+ export interface ProducerSync<A = any>
109
+ extends PushOp<
110
+ PushTag.ProducerSync,
111
+ {
112
+ readonly i0: SyncProducer<A>;
113
+ }
114
+ > {}
115
+
116
+ export interface ProducerIO<R = never, E = any, A = any>
117
+ extends PushOp<
118
+ PushTag.ProducerIO,
119
+ {
120
+ readonly i0: IOProducer<R, E, A>;
121
+ }
122
+ > {}
123
+
124
+ export interface Fail<E = any>
125
+ extends PushOp<
126
+ PushTag.FailCause,
127
+ {
128
+ readonly i0: () => Cause<E>;
129
+ }
130
+ > {}
131
+
132
+ export interface OnSuccess<A = any>
133
+ extends PushOp<
134
+ PushTag.OnSuccess,
135
+ {
136
+ readonly i0: Primitive;
137
+ readonly i1: (a: A) => Primitive;
138
+ }
139
+ > {}
140
+
141
+ export interface OnSuccessWithStrategy<A = any>
142
+ extends PushOp<
143
+ PushTag.OnSuccessWithStrategy,
144
+ {
145
+ readonly i0: Primitive;
146
+ readonly i1: (a: A) => Primitive;
147
+ readonly i2: FlattenStrategy;
148
+ readonly i3: ExecutionStrategy;
149
+ }
150
+ > {}
151
+
152
+ export interface OnSuccessAndFailure<E = any, A = any>
153
+ extends PushOp<
154
+ PushTag.OnSuccessAndFailure,
155
+ {
156
+ readonly i0: Primitive;
157
+ readonly i1: (cause: Cause<E>) => Primitive;
158
+ readonly i2: (a: A) => Primitive;
159
+ readonly i3: FlattenStrategy;
160
+ readonly i4: ExecutionStrategy;
161
+ }
162
+ > {}
163
+
164
+ export interface Transform
165
+ extends PushOp<
166
+ PushTag.Transform,
167
+ {
168
+ i0: Primitive;
169
+ i1: (io: IO<any, any, any>) => IO<any, never, void>;
170
+ }
171
+ > {}
172
+
173
+ type Primitive =
174
+ | Base
175
+ | ProducerSync
176
+ | ProducerIO
177
+ | Fail
178
+ | OnSuccess
179
+ | OnSuccessWithStrategy
180
+ | OnSuccessAndFailure
181
+ | FromPush
182
+ | Defer
183
+ | Transform;
184
+
185
+ export function concrete(push: Push<any, any, any>): asserts push is Primitive {
186
+ //
187
+ }
188
+
189
+ export function unsafeRunPush(push: Push<any, any, any>, sink: UnsafeSink<any, any, any>): IO<any, never, void> {
190
+ concrete(push);
191
+ switch (push._pushOpCode) {
192
+ case PushTag.Defer: {
193
+ return IO.defer(push.i0().unsafeRun(sink));
194
+ }
195
+ case PushTag.ProducerSync: {
196
+ return push.i0.runSink(sink);
197
+ }
198
+ case PushTag.ProducerIO: {
199
+ return push.i0.runSink(sink);
200
+ }
201
+ case PushTag.FailCause: {
202
+ return sink.onFailure(push.i0());
203
+ }
204
+ case PushTag.OnSuccessWithStrategy: {
205
+ return push.i2.withFork(
206
+ (fork) =>
207
+ push.i0.unsafeRun(
208
+ Sink.unsafeMake(
209
+ (value) => fork(push.i1(value).unsafeRun(sink)),
210
+ (cause) => sink.onFailure(cause),
211
+ ),
212
+ ),
213
+ push.i3,
214
+ );
215
+ }
216
+ case PushTag.OnSuccess: {
217
+ return push.i0.unsafeRun(
218
+ Sink.unsafeMake(
219
+ (value) => push.i1(value).unsafeRun(sink),
220
+ (cause) => sink.onFailure(cause),
221
+ ),
222
+ );
223
+ }
224
+ case PushTag.OnSuccessAndFailure: {
225
+ return push.i3.withFork(
226
+ (fork) =>
227
+ push.i0.unsafeRun(
228
+ Sink.unsafeMake(
229
+ (value) => fork(push.i2(value).unsafeRun(sink)),
230
+ (cause) => fork(push.i1(cause).unsafeRun(sink)),
231
+ ),
232
+ ),
233
+ push.i4,
234
+ );
235
+ }
236
+ case PushTag.FromPush: {
237
+ return IO.environmentWith((environment) => push.i0(sink).provideSomeEnvironment(environment));
238
+ }
239
+ case PushTag.Transform: {
240
+ return IO.defer(push.i1(push.i0.unsafeRun(sink)));
241
+ }
242
+ case null: {
243
+ return push.run(sink);
244
+ }
245
+ }
53
246
  }
@@ -1,5 +1,16 @@
1
1
  import type { RuntimeFiber } from "@fncts/io/Fiber";
2
2
 
3
+ export function withScope<R, E, A>(
4
+ f: (scope: Scope.Closeable) => IO<R, E, A>,
5
+ executionStrategy: ExecutionStrategy,
6
+ ): IO<R | Scope, E, A> {
7
+ return IO.bracketExit(
8
+ IO.scopeWith((scope) => scope.forkWith(executionStrategy)),
9
+ f,
10
+ (scope, exit) => scope.close(exit),
11
+ );
12
+ }
13
+
3
14
  export function withScopedFork<R, E, A>(
4
15
  f: (fork: <R, E, A>(io: IO<R, E, A>) => IO<R, never, RuntimeFiber<E, A>>) => IO<R, E, A>,
5
16
  ): IO<R, E, A> {
package/_src/Push.ts CHANGED
@@ -1,5 +1,11 @@
1
- // codegen:start { preset: barrel, include: ./Push/*.ts }
1
+ // codegen:start { preset: barrel, include: ./Push/*.ts, exclude: ./Push/Sink.ts }
2
2
  export * from "./Push/api.js";
3
+ export * from "./Push/Bounds.js";
3
4
  export * from "./Push/definition.js";
5
+ export * from "./Push/FlattenStrategy.js";
6
+ export * from "./Push/IndexedBuffer.js";
4
7
  export * from "./Push/internal.js";
8
+ export * from "./Push/MergeStrategy.js";
9
+ export * from "./Push/Operator.js";
10
+ export * from "./Push/Producer.js";
5
11
  // codegen:end
@@ -27,11 +27,17 @@ class DimapIO<RA, RB, EA, EB, A, B, RC, EC, C, RD, ED, D> extends QueueInternal<
27
27
  super();
28
28
  }
29
29
 
30
- awaitShutdown: UIO<void> = this.queue.awaitShutdown;
30
+ get awaitShutdown(): UIO<void> {
31
+ return this.queue.awaitShutdown;
32
+ }
31
33
 
32
- capacity: number = this.queue.capacity;
34
+ get capacity(): number {
35
+ return this.queue.capacity;
36
+ }
33
37
 
34
- isShutdown: UIO<boolean> = this.queue.isShutdown;
38
+ get isShutdown(): UIO<boolean> {
39
+ return this.queue.isShutdown;
40
+ }
35
41
 
36
42
  get unsafeSize(): Maybe<number> {
37
43
  return this.queue.unsafeSize;
@@ -49,13 +55,21 @@ class DimapIO<RA, RB, EA, EB, A, B, RC, EC, C, RD, ED, D> extends QueueInternal<
49
55
  return IO.foreach(cs, this.f).flatMap((as) => this.queue.offerAll(as));
50
56
  }
51
57
 
52
- shutdown: UIO<void> = this.queue.shutdown;
58
+ get shutdown(): UIO<void> {
59
+ return this.queue.shutdown;
60
+ }
53
61
 
54
- size: UIO<number> = this.queue.size;
62
+ get size(): UIO<number> {
63
+ return this.queue.size;
64
+ }
55
65
 
56
- take: IO<RD | RB, ED | EB, D> = this.queue.take.flatMap(this.g);
66
+ get take(): IO<RD | RB, ED | EB, D> {
67
+ return this.queue.take.flatMap(this.g);
68
+ }
57
69
 
58
- takeAll: IO<RD | RB, ED | EB, Conc<D>> = this.queue.takeAll.flatMap((bs) => IO.foreach(bs, this.g));
70
+ get takeAll(): IO<RD | RB, ED | EB, Conc<D>> {
71
+ return this.queue.takeAll.flatMap((bs) => IO.foreach(bs, this.g));
72
+ }
59
73
 
60
74
  takeUpTo(n: number): IO<RD | RB, ED | EB, Conc<D>> {
61
75
  return this.queue.takeUpTo(n).flatMap((bs) => IO.foreach(bs, this.g));
@@ -154,11 +168,17 @@ class ContramapIO<RA, RB, EA, EB, A, B, RC, EC, C> implements PEnqueueInternal<R
154
168
  readonly f: (c: C) => IO<RC, EC, A>,
155
169
  ) {}
156
170
 
157
- awaitShutdown: UIO<void> = this.queue.awaitShutdown;
171
+ get awaitShutdown(): UIO<void> {
172
+ return this.queue.awaitShutdown;
173
+ }
158
174
 
159
- capacity: number = this.queue.capacity;
175
+ get capacity(): number {
176
+ return this.queue.capacity;
177
+ }
160
178
 
161
- isShutdown: UIO<boolean> = this.queue.isShutdown;
179
+ get isShutdown(): UIO<boolean> {
180
+ return this.queue.isShutdown;
181
+ }
162
182
 
163
183
  get unsafeSize(): Maybe<number> {
164
184
  return this.queue.unsafeSize;
@@ -176,9 +196,13 @@ class ContramapIO<RA, RB, EA, EB, A, B, RC, EC, C> implements PEnqueueInternal<R
176
196
  return IO.foreach(cs, this.f).flatMap((as) => this.queue.offerAll(as));
177
197
  }
178
198
 
179
- shutdown: UIO<void> = this.queue.shutdown;
199
+ get shutdown(): UIO<void> {
200
+ return this.queue.shutdown;
201
+ }
180
202
 
181
- size: UIO<number> = this.queue.size;
203
+ get size(): UIO<number> {
204
+ return this.queue.size;
205
+ }
182
206
  }
183
207
 
184
208
  /**
@@ -209,15 +233,25 @@ class MapIO<RA, RB, EA, EB, A, B, RC, EC, C> implements PDequeueInternal<RA, RB
209
233
  readonly f: (b: B) => IO<RC, EC, C>,
210
234
  ) {}
211
235
 
212
- awaitShutdown: UIO<void> = this.queue.awaitShutdown;
236
+ get awaitShutdown(): UIO<void> {
237
+ return this.queue.awaitShutdown;
238
+ }
213
239
 
214
- capacity: number = this.queue.capacity;
240
+ get capacity(): number {
241
+ return this.queue.capacity;
242
+ }
215
243
 
216
- isShutdown: UIO<boolean> = this.queue.isShutdown;
244
+ get isShutdown(): UIO<boolean> {
245
+ return this.queue.isShutdown;
246
+ }
217
247
 
218
- shutdown: UIO<void> = this.queue.shutdown;
248
+ get shutdown(): UIO<void> {
249
+ return this.queue.shutdown;
250
+ }
219
251
 
220
- size: UIO<number> = this.queue.size;
252
+ get size(): UIO<number> {
253
+ return this.queue.size;
254
+ }
221
255
 
222
256
  get unsafeSize(): Maybe<number> {
223
257
  return this.queue.unsafeSize;
@@ -227,9 +261,13 @@ class MapIO<RA, RB, EA, EB, A, B, RC, EC, C> implements PDequeueInternal<RA, RB
227
261
  throw new Error("Cannot unsafely offer to an effectful Queue");
228
262
  }
229
263
 
230
- take: IO<RB | RC, EB | EC, C> = this.queue.take.flatMap(this.f);
264
+ get take(): IO<RB | RC, EB | EC, C> {
265
+ return this.queue.take.flatMap(this.f);
266
+ }
231
267
 
232
- takeAll: IO<RB | RC, EB | EC, Conc<C>> = this.queue.takeAll.flatMap((bs) => IO.foreach(bs, this.f));
268
+ get takeAll(): IO<RB | RC, EB | EC, Conc<C>> {
269
+ return this.queue.takeAll.flatMap((bs) => IO.foreach(bs, this.f));
270
+ }
233
271
 
234
272
  takeUpTo(n: number): IO<RB | RC, EB | EC, Conc<C>> {
235
273
  return this.queue.takeUpTo(n).flatMap((bs) => IO.foreach(bs, this.f));
@@ -10,11 +10,17 @@ class FilterInputIO<RA, RB, EA, EB, B, A, A1 extends A, R2, E2> extends QueueInt
10
10
  super();
11
11
  }
12
12
 
13
- awaitShutdown: UIO<void> = this.queue.awaitShutdown;
13
+ get awaitShutdown(): UIO<void> {
14
+ return this.queue.awaitShutdown;
15
+ }
14
16
 
15
- capacity: number = this.queue.capacity;
17
+ get capacity(): number {
18
+ return this.queue.capacity;
19
+ }
16
20
 
17
- isShutdown: UIO<boolean> = this.queue.isShutdown;
21
+ get isShutdown(): UIO<boolean> {
22
+ return this.queue.isShutdown;
23
+ }
18
24
 
19
25
  get unsafeSize(): Maybe<number> {
20
26
  return this.queue.unsafeSize;
@@ -39,13 +45,21 @@ class FilterInputIO<RA, RB, EA, EB, B, A, A1 extends A, R2, E2> extends QueueInt
39
45
  });
40
46
  }
41
47
 
42
- shutdown: UIO<void> = this.queue.shutdown;
48
+ get shutdown(): UIO<void> {
49
+ return this.queue.shutdown;
50
+ }
43
51
 
44
- size: UIO<number> = this.queue.size;
52
+ get size(): UIO<number> {
53
+ return this.queue.size;
54
+ }
45
55
 
46
- take: IO<RB, EB, B> = this.queue.take;
56
+ get take(): IO<RB, EB, B> {
57
+ return this.queue.take;
58
+ }
47
59
 
48
- takeAll: IO<RB, EB, Conc<B>> = this.queue.takeAll;
60
+ get takeAll(): IO<RB, EB, Conc<B>> {
61
+ return this.queue.takeAll;
62
+ }
49
63
 
50
64
  takeUpTo(max: number): IO<RB, EB, Conc<B>> {
51
65
  return this.queue.takeUpTo(max);
@@ -94,11 +108,17 @@ class FilterInputEnqueueIO<RA, RB, EA, EB, B, A, A1 extends A, R2, E2>
94
108
  readonly f: (_: A1) => IO<R2, E2, boolean>,
95
109
  ) {}
96
110
 
97
- awaitShutdown: UIO<void> = this.queue.awaitShutdown;
111
+ get awaitShutdown(): UIO<void> {
112
+ return this.queue.awaitShutdown;
113
+ }
98
114
 
99
- capacity: number = this.queue.capacity;
115
+ get capacity(): number {
116
+ return this.queue.capacity;
117
+ }
100
118
 
101
- isShutdown: UIO<boolean> = this.queue.isShutdown;
119
+ get isShutdown(): UIO<boolean> {
120
+ return this.queue.isShutdown;
121
+ }
102
122
 
103
123
  get unsafeSize(): Maybe<number> {
104
124
  return this.queue.unsafeSize;
@@ -123,9 +143,13 @@ class FilterInputEnqueueIO<RA, RB, EA, EB, B, A, A1 extends A, R2, E2>
123
143
  });
124
144
  }
125
145
 
126
- shutdown: UIO<void> = this.queue.shutdown;
146
+ get shutdown(): UIO<void> {
147
+ return this.queue.shutdown;
148
+ }
127
149
 
128
- size: UIO<number> = this.queue.size;
150
+ get size(): UIO<number> {
151
+ return this.queue.size;
152
+ }
129
153
  }
130
154
 
131
155
  /**
@@ -10,11 +10,17 @@ class FilterOutputIO<RA, RB, EA, EB, A, B, RB1, EB1> extends QueueInternal<RA, R
10
10
  super();
11
11
  }
12
12
 
13
- awaitShutdown: UIO<void> = this.queue.awaitShutdown;
13
+ get awaitShutdown(): UIO<void> {
14
+ return this.queue.awaitShutdown;
15
+ }
14
16
 
15
- capacity: number = this.queue.capacity;
17
+ get capacity(): number {
18
+ return this.queue.capacity;
19
+ }
16
20
 
17
- isShutdown: UIO<boolean> = this.queue.isShutdown;
21
+ get isShutdown(): UIO<boolean> {
22
+ return this.queue.isShutdown;
23
+ }
18
24
 
19
25
  get unsafeSize(): Maybe<number> {
20
26
  return this.queue.unsafeSize;
@@ -32,15 +38,21 @@ class FilterOutputIO<RA, RB, EA, EB, A, B, RB1, EB1> extends QueueInternal<RA, R
32
38
  return this.queue.offerAll(as);
33
39
  }
34
40
 
35
- shutdown: UIO<void> = this.queue.shutdown;
41
+ get shutdown(): UIO<void> {
42
+ return this.queue.shutdown;
43
+ }
36
44
 
37
- size: UIO<number> = this.queue.size;
45
+ get size(): UIO<number> {
46
+ return this.queue.size;
47
+ }
38
48
 
39
- take: IO<RB | RB1, EB1 | EB, B> = this.queue.take.flatMap((b) =>
40
- this.f(b).flatMap((p) => (p ? IO.succeedNow(b) : this.take)),
41
- );
49
+ get take(): IO<RB | RB1, EB1 | EB, B> {
50
+ return this.queue.take.flatMap((b) => this.f(b).flatMap((p) => (p ? IO.succeedNow(b) : this.take)));
51
+ }
42
52
 
43
- takeAll: IO<RB | RB1, EB | EB1, Conc<B>> = this.queue.takeAll.flatMap((bs) => IO.filter(bs, this.f));
53
+ get takeAll(): IO<RB | RB1, EB | EB1, Conc<B>> {
54
+ return this.queue.takeAll.flatMap((bs) => IO.filter(bs, this.f));
55
+ }
44
56
 
45
57
  loop(max: number, acc: Conc<B>): IO<RB | RB1, EB | EB1, Conc<B>> {
46
58
  return this.queue.takeUpTo(max).flatMap((bs) => {
@@ -102,15 +114,25 @@ class FilterOutputDequeueIO<RA, RB, EA, EB, A, B, RB1, EB1>
102
114
  readonly f: (b: B) => IO<RB1, EB1, boolean>,
103
115
  ) {}
104
116
 
105
- awaitShutdown: UIO<void> = this.queue.awaitShutdown;
117
+ get awaitShutdown(): UIO<void> {
118
+ return this.queue.awaitShutdown;
119
+ }
106
120
 
107
- capacity: number = this.queue.capacity;
121
+ get capacity(): number {
122
+ return this.queue.capacity;
123
+ }
108
124
 
109
- isShutdown: UIO<boolean> = this.queue.isShutdown;
125
+ get isShutdown(): UIO<boolean> {
126
+ return this.queue.isShutdown;
127
+ }
110
128
 
111
- shutdown: UIO<void> = this.queue.shutdown;
129
+ get shutdown(): UIO<void> {
130
+ return this.queue.shutdown;
131
+ }
112
132
 
113
- size: UIO<number> = this.queue.size;
133
+ get size(): UIO<number> {
134
+ return this.queue.size;
135
+ }
114
136
 
115
137
  get unsafeSize(): Maybe<number> {
116
138
  return this.queue.unsafeSize;
@@ -120,11 +142,13 @@ class FilterOutputDequeueIO<RA, RB, EA, EB, A, B, RB1, EB1>
120
142
  throw new Error("Cannot unsafely offer to an effectful Queue");
121
143
  }
122
144
 
123
- take: IO<RB | RB1, EB1 | EB, B> = this.queue.take.flatMap((b) =>
124
- this.f(b).flatMap((p) => (p ? IO.succeedNow(b) : this.take)),
125
- );
145
+ get take(): IO<RB | RB1, EB1 | EB, B> {
146
+ return this.queue.take.flatMap((b) => this.f(b).flatMap((p) => (p ? IO.succeedNow(b) : this.take)));
147
+ }
126
148
 
127
- takeAll: IO<RB | RB1, EB | EB1, Conc<B>> = this.queue.takeAll.flatMap((bs) => IO.filter(bs, this.f));
149
+ get takeAll(): IO<RB | RB1, EB | EB1, Conc<B>> {
150
+ return this.queue.takeAll.flatMap((bs) => IO.filter(bs, this.f));
151
+ }
128
152
 
129
153
  loop(max: number, acc: Conc<B>): IO<RB | RB1, EB | EB1, Conc<B>> {
130
154
  return this.queue.takeUpTo(max).flatMap((bs) => {
@@ -17,11 +17,17 @@ class ZipWithIO<RA, RB, EA, EB, A, B, RA1, RB1, EA1, EB1, A1 extends A, B1, R3,
17
17
  super();
18
18
  }
19
19
 
20
- awaitShutdown: UIO<void> = this.fa.awaitShutdown.flatMap(() => this.fb.awaitShutdown);
20
+ get awaitShutdown(): UIO<void> {
21
+ return this.fa.awaitShutdown.flatMap(() => this.fb.awaitShutdown);
22
+ }
21
23
 
22
- capacity: number = Math.min(this.fa.capacity, this.fb.capacity);
24
+ get capacity(): number {
25
+ return Math.min(this.fa.capacity, this.fb.capacity);
26
+ }
23
27
 
24
- isShutdown: UIO<boolean> = this.fa.isShutdown;
28
+ get isShutdown(): UIO<boolean> {
29
+ return this.fa.isShutdown;
30
+ }
25
31
 
26
32
  get unsafeSize(): Maybe<number> {
27
33
  return this.fa.unsafeSize.zipWith(this.fb.unsafeSize, (a, b) => Math.max(a, b));
@@ -39,17 +45,23 @@ class ZipWithIO<RA, RB, EA, EB, A, B, RA1, RB1, EA1, EB1, A1 extends A, B1, R3,
39
45
  return this.fa.offerAll(as).zipWithConcurrent(this.fb.offerAll(as), (x, y) => x && y);
40
46
  }
41
47
 
42
- shutdown: UIO<void> = this.fa.shutdown.zipWithConcurrent(this.fb.shutdown, () => undefined);
48
+ get shutdown(): UIO<void> {
49
+ return this.fa.shutdown.zipWithConcurrent(this.fb.shutdown, () => undefined);
50
+ }
43
51
 
44
- size: UIO<number> = this.fa.size.zipWithConcurrent(this.fb.size, (x, y) => Math.max(x, y));
52
+ get size(): UIO<number> {
53
+ return this.fa.size.zipWithConcurrent(this.fb.size, (x, y) => Math.max(x, y));
54
+ }
45
55
 
46
- take: IO<RB | RB1 | R3, E3 | EB | EB1, C> = this.fa.take
47
- .zipConcurrent(this.fb.take)
48
- .flatMap(([b, c]) => this.f(b, c));
56
+ get take(): IO<RB | RB1 | R3, E3 | EB | EB1, C> {
57
+ return this.fa.take.zipConcurrent(this.fb.take).flatMap(([b, c]) => this.f(b, c));
58
+ }
49
59
 
50
- takeAll: IO<RB | RB1 | R3, E3 | EB | EB1, Conc<C>> = this.fa.takeAll
51
- .zipConcurrent(this.fb.takeAll)
52
- .flatMap(([bs, cs]) => IO.foreach(bs.zip(cs), ([b, c]) => this.f(b, c)));
60
+ get takeAll(): IO<RB | RB1 | R3, E3 | EB | EB1, Conc<C>> {
61
+ return this.fa.takeAll
62
+ .zipConcurrent(this.fb.takeAll)
63
+ .flatMap(([bs, cs]) => IO.foreach(bs.zip(cs), ([b, c]) => this.f(b, c)));
64
+ }
53
65
 
54
66
  takeUpTo(max: number): IO<RB | RB1 | R3, E3 | EB | EB1, Conc<C>> {
55
67
  return this.fa
@@ -16,11 +16,17 @@ class UnsafeQueue<A> extends QueueInternal<never, never, never, never, A, A> {
16
16
  super();
17
17
  }
18
18
 
19
- awaitShutdown: UIO<void> = this.shutdownHook.await;
19
+ get awaitShutdown(): UIO<void> {
20
+ return this.shutdownHook.await;
21
+ }
20
22
 
21
- capacity: number = this.queue.capacity;
23
+ get capacity(): number {
24
+ return this.queue.capacity;
25
+ }
22
26
 
23
- isShutdown: UIO<boolean> = IO.succeed(this.shutdownFlag.get);
27
+ get isShutdown(): UIO<boolean> {
28
+ return IO.succeed(this.shutdownFlag.get);
29
+ }
24
30
 
25
31
  get unsafeSize(): Maybe<number> {
26
32
  if (this.shutdownFlag.get) {