0.2.2 #31

Merged
Thilawyn merged 184 commits from next into master 2026-01-16 17:05:31 +01:00
Showing only changes of commit 95d0bf70bd - Show all commits

View File

@@ -59,8 +59,7 @@ extends Pipeable.Class() implements Query<K, A, E, R, P> {
} }
get run(): Effect.Effect<void> { get run(): Effect.Effect<void> {
return Effect.provide( return Stream.runForEach(this.key, key => this.interrupt.pipe(
Stream.runForEach(this.key, key => this.interrupt.pipe(
Effect.andThen(SubscriptionRef.set(this.latestKey, Option.some(key))), Effect.andThen(SubscriptionRef.set(this.latestKey, Option.some(key))),
Effect.andThen(this.latestFinalResult), Effect.andThen(this.latestFinalResult),
Effect.andThen(previous => this.startCached(key, Option.isSome(previous) Effect.andThen(previous => this.startCached(key, Option.isSome(previous)
@@ -68,9 +67,9 @@ extends Pipeable.Class() implements Query<K, A, E, R, P> {
: Result.initial() : Result.initial()
)), )),
Effect.andThen(sub => Effect.forkScoped(this.watch(key, sub))), Effect.andThen(sub => Effect.forkScoped(this.watch(key, sub))),
)).pipe(
this.runSemaphore.withPermits(1), this.runSemaphore.withPermits(1),
)), Effect.provide(this.context),
this.context,
) )
} }