parallel
parallel copied to clipboard
parBuffer smells wrong
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.
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.
Ah, I see! We just need to document that!