Skip to content

TechDebt: TaskContext.TaskChannel is never closed #448

@karlkfi

Description

@karlkfi

taskrunner.NewTaskContext creates a new TaskChannel, but never closes it.

The tests don't seem to care, but it means you can't listen on the TaskChannel until it is closed, including for tr := range taskContext.TaskChannel() {, which makes usage of the TaskChannel need some other mechanism to stop listening.

In general, the function or goroutine that sends or manages sending things to the channel should close it as a signal that no more will be sent. This implies that the TaskRunner should close the TaskChannel, since it manages the tasks that send events to the shared channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions