Forum Discussion
adelarsq
Nov 12, 2021Copper Contributor
F#: Tasks vs Async
With F# 6 now we have option to also using Tasks. Which are the drawbacks to use Tasks or Async? Also appears that Tasks are faster. How much faster? Thanks in advance.
pblasucci
Nov 15, 2021Copper Contributor
There was actually a bit of discussion about this on Twitter just a few days ago.
TL; DR --
The Task CE is meant to simplify cases where you have a lot of interop with other existing Task-based APIs (eg: you're writing an APS.NET Core middleware), or if lots of profiling dictates that Async CE is causing performance issues. But by and large, the Async CE should be preferred.
Hope this helps! 🙂
TL; DR --
The Task CE is meant to simplify cases where you have a lot of interop with other existing Task-based APIs (eg: you're writing an APS.NET Core middleware), or if lots of profiling dictates that Async CE is causing performance issues. But by and large, the Async CE should be preferred.
Hope this helps! 🙂