Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Incorporate context.Context into SourceManager #423

@fabulous-gopher

Description

@fabulous-gopher

From @sdboyer on January 26, 2017 2:27

We need to start using context.Context for handling cancellation-type behaviors within the SourceManager. There are two parts to this:

  • A context.Context should be passed to NewSourceManager(), and the cancellation channel there used to replace the exposed signal handling system. (It's still fine to have a helper func that sets up a Context for this purpose, though.)
  • SourceManager methods that touch disk or network - so, pretty much all of them - also need to take a context.Context, so that the caller has the option of controlling timeouts or forcing terminations.

There's no way this is feasible without a wider refactor of *SourceMgr to use channel-based brokers for all its activity, but that's fine - that absolutely needs to happen anyway. We can do all of that at the same time.

re: #160

Copied from original issue: sdboyer/gps#159

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions