@@ -59,8 +59,7 @@ extends Pipeable.Class() implements Query<K, A, E, R, P> {
|
||||
}
|
||||
|
||||
get run(): Effect.Effect<void> {
|
||||
return Effect.provide(
|
||||
Stream.runForEach(this.key, key => this.interrupt.pipe(
|
||||
return Stream.runForEach(this.key, key => this.interrupt.pipe(
|
||||
Effect.andThen(SubscriptionRef.set(this.latestKey, Option.some(key))),
|
||||
Effect.andThen(this.latestFinalResult),
|
||||
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()
|
||||
)),
|
||||
Effect.andThen(sub => Effect.forkScoped(this.watch(key, sub))),
|
||||
)).pipe(
|
||||
this.runSemaphore.withPermits(1),
|
||||
)),
|
||||
this.context,
|
||||
Effect.provide(this.context),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user