TaskRegistry
The task definitions the scheduler can run, looked up by name when a task is reserved. This simple registry holds tasks only; M5’s extension registry builds on the same shape and adds tools, sections and hot reload.
A task stays blocked, never failed, while its definition is missing, so installing one later wakes it up.
Since v0.0.0
TaskRegistry (class)
Section titled “TaskRegistry (class)”Signature
declare class TaskRegistrySince v0.0.0
TaskRegistryShape (interface)
Section titled “TaskRegistryShape (interface)”Signature
export interface TaskRegistryShape { /** The installed definition with this name. */ readonly get: (name: string) => Option.Option<Task.Any> /** * Install definitions until the scope closes. Installing a name that is already installed replaces it, and closing * the scope removes the definition again only if it is still the installed one. Listeners are told after each change. */ readonly install: (tasks: Iterable<Task.Any>) => Effect.Effect<void, never, Scope.Scope> /** Call `listener` after every install or uninstall, until the scope closes. It must not throw or block. */ readonly subscribe: (listener: () => void) => Effect.Effect<void, never, Scope.Scope>}Since v0.0.0
A registry holding tasks.
Signature
declare const layer: (tasks?: Iterable<Task.Any>) => Layer.Layer<TaskRegistry>Since v0.0.0
layerInstall
Section titled “layerInstall”Install tasks into the registry in context for the lifetime of the layer.
Signature
declare const layerInstall: (tasks: Iterable<Task.Any>) => Layer.Layer<never, never, TaskRegistry>Since v0.0.0