Why shouldn't I use F# asynchronous workflows for parallelism? -


I am recently learning F #, I am easily interested in exploiting data symmetry. Data | & Gt; Array.map | & Gt; Async.Parallel | & Gt; Async.RunSynchronously seems to be easy and simple to understand phrases and get real value.

So why is it that async is not really for it? It is said that PLINQ and the future are probably a better option. And I who read other messages here, to agree with them and also with the recommendation of TPL (PLINQ does not seem much different in the above underlying functions, unless you PSeq functions are using F # Powerpack for.)

F # and a lot of emotions in functional languages ​​for it, and has achieved great success with the async Smantawad .

So why not << em> async to execute parallel data processes? Instead of using PLINQ or TPL, what can I lose by writing parallel async code?

I wrote an article that is a Task and Async < Using both / code> to re-apply a C # TPL sample, there are some comments on the difference between the two. You and one may also be here too.

Here is an excerpt from the first article comparing two articles:

The choice between two possible implementations depends on many factors. The Asynchronous workflow was specially designed for F #, so they fit more naturally with language. They provide better performance for I / O bound tasks and provide more convenient exception management. In addition, sequential syntax is quite convenient. On the other hand, tasks are optimized for CPU bound calculation and makes the results of calculations from other places in the app without clear caching.

Comments