suave icon indicating copy to clipboard operation
suave copied to clipboard

Support Task CE natively

Open jkone27 opened this issue 2 years ago • 2 comments

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

jkone27 avatar Mar 15 '22 09:03 jkone27

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

njlr avatar Jan 14 '23 10:01 njlr

Agreed I think is about time to bring Task to Suave.

ademar avatar Jan 14 '23 14:01 ademar