You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@erisco asked on the PureScript Slack wether or not runStreamAff runs Affs in parallel or sequentially. This made me realize that there is no way to control that currently. @limemloh and I have discussed it and this is what I propose.
We will have two ways of running Affs from streams. One, runStreamAff which runs effects in parallel and an alternative runStreamAffPar which takes an integer n specifying that only n threads may run in parallel. Then runStreamAff is essentially the same as runStreamAffPar Infinity and runStreamAffPar 1 runs the Affs completely sequentially.
The first simply delivers the result as they come back, the second discards old results (what you want for the zip code example) and the last one delivers results in the same order that they came in, delaying results if some preceding Affs are slow.
Does this handle all the different orderings that one may want? What do you think @erisco?
The text was updated successfully, but these errors were encountered:
@erisco asked on the PureScript Slack wether or not
runStreamAff
runsAff
s in parallel or sequentially. This made me realize that there is no way to control that currently. @limemloh and I have discussed it and this is what I propose.We will have two ways of running
Aff
s from streams. One,runStreamAff
which runs effects in parallel and an alternativerunStreamAffPar
which takes an integern
specifying that onlyn
threads may run in parallel. ThenrunStreamAff
is essentially the same asrunStreamAffPar Infinity
andrunStreamAffPar 1
runs theAff
s completely sequentially.These are the types:
Unlike the current
runStreamAff
these delivers their result asFuture
s. To flatten and order these we will add the following functions:The first simply delivers the result as they come back, the second discards old results (what you want for the zip code example) and the last one delivers results in the same order that they came in, delaying results if some preceding
Aff
s are slow.Does this handle all the different orderings that one may want? What do you think @erisco?
The text was updated successfully, but these errors were encountered: