parallel icon indicating copy to clipboard operation
parallel copied to clipboard

parBuffer smells wrong

Open treeowl opened this issue 7 years ago • 2 comments
trafficstars

It looks to me as though parBuffer is supposed to spark a limited number of computations at any one time. But as far as I can tell, it actually sparks an unlimited number. In particular, I believe ret (x : xs) (y : ys) should force x.

treeowl avatar Jun 01 '18 20:06 treeowl

Looks ok to me. The start function sparks the first N elements, and then as we consume each cons of the result list, ret sparks element N+1, N+2, ... etc.

simonmar avatar Jun 02 '18 07:06 simonmar

Ah, I see! We just need to document that!

treeowl avatar Jun 02 '18 12:06 treeowl