Skip to content

Harden Queue#take's cancelation properties #2920

@djspiewak

Description

@djspiewak

take must have the property such that it either does not remove the element, or it removes the element and returns it, even when canceled. Thus the whole thing must be uncancelable aside from an atomic poll (when semantic blocking is needed). Without this property, it is possible in rare race conditions to cancel a take and lose data.

Applies to both the existing Concurrent queue and the new Async queue in #2885

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions