Skip to content

CancellableReadStream #945

@jnm2

Description

@jnm2

@AArnott Would this be a good home for an implementation of a stream which implements ReadAsync cancellation around a base stream that may have no support or partial support for cancellation?

I have a prototype with tests that I can contribute which works by caching the previous ReadAsync task if the base stream doesn't cancel when the wrapper does. It's been useful for wrapping streams such as Console.OpenStandardInput() which are synchronously implemented and the base Stream.ReadAsync method is in play. Such streams can't cancel mid-read, but some stream consumption scenarios need to be able to cancel and continue later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions