Skip to content

supervisor: introduce TaskExecutor, thread it through stream openers #89

Description

@mfw78

Problem. Reconnect tasks spawn into a bare JoinSet<()> created in main; there is no injectable executor and no typed task handle, and open_block_streams/open_log_streams are async fn that never .await before spawning.

Change. Define trait TaskExecutor { fn spawn(&self, fut) -> TaskHandle; } with a TokioExecutor default, replace the &mut JoinSet params with &dyn TaskExecutor, add an explicit task-exit reason, and drop the vestigial async.

Files. runtime/event_loop.rs, new runtime/task.rs, bootstrap.rs, supervisor/tests.rs.

Risk / size. Medium; signature change on three fns plus a supervisor test. Size: M.

Depends on. the hoisted launch body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions