Add Effect v4 support, Fast Refresh tooling, and revamped docs #56
@@ -12,7 +12,6 @@ export interface ScopeRegistryService {
|
||||
release(key: ScopeRegistryService.Key): Effect.Effect<ScopeRegistryService.Entry, Cause.NoSuchElementError>
|
||||
|
||||
readonly run: Effect.Effect<void>
|
||||
readonly dispose: Effect.Effect<void>
|
||||
}
|
||||
|
||||
export declare namespace ScopeRegistryService {
|
||||
@@ -94,6 +93,7 @@ export class ScopeRegistryServiceImpl implements ScopeRegistryService {
|
||||
)),
|
||||
})),
|
||||
Stream.runDrain,
|
||||
Effect.ensuring(this.dispose),
|
||||
this.runSemaphore.withPermit,
|
||||
)
|
||||
}
|
||||
@@ -173,8 +173,5 @@ export class ScopeRegistry extends Context.Service<ScopeRegistry, ScopeRegistryS
|
||||
|
||||
export const layer = Layer.effect(ScopeRegistry, Effect.tap(
|
||||
make,
|
||||
registry => Effect.andThen(
|
||||
Effect.addFinalizer(() => registry.dispose),
|
||||
Effect.forkScoped(registry.run),
|
||||
),
|
||||
registry => Effect.forkScoped(registry.run),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user