How to achieve Asynchrony instead of Parallelism in F#

后端 未结 5 1832
无人共我
无人共我 2021-02-08 23:24

(Sticking to a common example with async fetch of many web pages)

How would I spin off multiple (hundreds) of web page requests asynchronously, and then wait for all req

5条回答
  •  抹茶落季
    2021-02-08 23:47

    My bet is that the speedup you're experiencing is not significant enough for your taste because you're either using a subtype of WebRequest or a class relying on it (such as WebClient).
    If that's the case, you need to set the MaxConnection on the ConnectionManagementElement (and I suggest you only set it if needed otherwise it's gonna become a pretty time-consuming operation) to a high value, depending on the number of simultaneous connections you wanna initiate from your application.

提交回复
热议问题