Skip to content

queue.Queue - Adding Cancelling Support #102983

Open
@mementum

Description

@mementum

Feature or enhancement

Adding methods cancel and cancel_all (akin to notify and notify_all to queue.Queue to support cancelling a get (and potentially a put) operation.

Pitch

Awaiting on get of an asyncio can be cancelled. But waiting on the get of a queue.Queue cannot be cancelled. A usual pattern is sending None to the queue, but this is simply a convention.

Previous discussion

https://discuss.python.org/t/queue-queue-adding-cancelling-support/25123

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions