Skip to content

About single-worker equivalence to sequential #300

@Enchufa2

Description

@Enchufa2

I'm not sure whether this is a design decision or a limitation, but I find it quite odd. Basically, workers=1 does not setup any worker, and workers=2 sets up 2 workers. This is, at the very least, inconsistent and confusing.

If there is no underlying limitation, I would like to propose a change, because I think there are important use cases for having a single worker (apart from the main process).

Consider an online API with rate limitation. Say that we are downloading information using methods A and B from that API, with different rate limits, so that A provides some info to use with B. The most straightforward way to implement this would be to manage method A in the main process, taking into account rate limits for A, and send jobs to a single worker that would manage method B and its rate limitations. Note that, with several workers, there may be race conditions, and things gets quite more complicated to avoid crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backend APIPart of the Future API that only backend package developers rely onFrontend APIPart of the Future API that users of futures rely onannoyancyfeature request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions