Skip to content

Allowing to switch to a LIFO queue in ThreadPoolExecutor #118852

@mosheber

Description

@mosheber

Feature or enhancement

Proposal:

Adding a simple boolean parameter to the ThreadPoolExecutor, allowing to submit new workers in a LIFO manner, rather than a FIFO manner.

# Add a code block here, if required
executor = ThreadPoolExecutor(max_workers=10, fifo_queue=False)

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions