Skip to content

Dequeue before dispatching workers #1898

@harendra-kumar

Description

@harendra-kumar

Currently we dispatch workers and workers dequeue the work and then execute it. The disadvantage is that after the worker is dispatched it might find the queue empty and then return without doing any work. This is fine when we are dispatching when consuming. However, when doing eager dispatch we may create a storm of workers and those may just return without doing any work. So we can perform a dequeue even before dispatching a worker so that we do not even fork a worker if we do not have work to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions