0.1.11 #14

Merged
Thilawyn merged 318 commits from next into master 2025-05-19 14:01:41 +02:00
Showing only changes of commit f85173fa68 - Show all commits

View File

@@ -58,9 +58,12 @@ export const make = <EH, K extends readonly unknown[], A, E, HandledE, R>(
const forkMutate = (...key: K) => Queue.unbounded<AsyncData.AsyncData<A, Exclude<E, HandledE>>>().pipe( const forkMutate = (...key: K) => Queue.unbounded<AsyncData.AsyncData<A, Exclude<E, HandledE>>>().pipe(
Effect.flatMap(stateQueue => Effect.flatMap(stateQueue =>
run(key, value => Queue.offer(stateQueue, value).pipe( run(
Effect.andThen(Ref.set(stateRef, value)) key,
)).pipe( value => Ref.set(stateRef, value).pipe(
Effect.andThen(Queue.offer(stateQueue, value))
),
).pipe(
Effect.tap(() => Queue.shutdown(stateQueue)), Effect.tap(() => Queue.shutdown(stateQueue)),
Effect.forkDaemon, Effect.forkDaemon,
Effect.map(fiber => [fiber, Stream.fromQueue(stateQueue)] as const) Effect.map(fiber => [fiber, Stream.fromQueue(stateQueue)] as const)