Open jkone27 opened 2 years ago
I could imagine a type like this working well:
[<Struct>]
type Response<'t> =
| Value of value : 't
| Sync of sync : (unit -> 't)
| Async of async : Async<'t>
| ColdTask of coldTask : (unit -> Task<'t>)
| CancellableTask of cancellableTask : (CancellationToken -> Task<'t>)
It would be a breaking change though
Agreed I think is about time to bring Task to Suave.
maybe also providing support for Task or IcedTask instead of Async could improve suave performance quite a bit over the original async.
since latest F# we have native task CE support, and now also this was recently published/developed..
https://github.com/TheAngryByrd/IcedTasks