Skip to content

Support fields returning IcedTasks' CancellableTask/CancellableValueTask #19

@cmeeren

Description

@cmeeren

IcedTask has CEs for CancellableTask/CancellableValueTask. These types are just aliases for CancellationToken -> Task<_> and CancellationToken -> ValueTask<_>.

Currently, fields must accept a CancellationToken and apply this, e.g.:

member _.GetStuff(ct) = getStuff () ct

I'd like:

member _.GetStuff() = getStuff ()

Not sure how to accomplish this without having to either take a dependency on IcedTasks, which I don't want (for the main package at least, and ideally I'd prefer a single package), or otherwise use the task CE in this implementation, which defeats the point of the fields being ValueTask in the first place.

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