Skip to content

unsoundness if cancelled future was in readiness queue #5

@StoicDeveloper

Description

@StoicDeveloper

This crate is unsound. If a future is cancelled while its task is in the readiness queue, then the task will be dropped, and then can be dereferenced when the MappedFutures is next polled.

Solutions may include:

  • add to Task Option and Option fields that can be used to set remove an item from the queue if it gets cancelled
  • drop the future on cancellation, but don't drop the task. Instead check during ReadyToRunQueue dequeue() whether the future was dropped. If so, dequeue again and drop the current task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions