[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Some comments after reading the r7rs public draft
On Thu, Jun 7, 2012 at 7:43 AM, Alaric Snell-Pym <alaric@x>
> No, the idea is for `delay` to fork a thread and `force` to join it (unless
> the result is already cached).A better implementation approach would probably be to have a pool of
low-priority "idle threads" that, when scheduled, pick pending promises
from a (priority?) queue and force them.
I don't think it is a good idea to mix laziness, which is about delaying computation, with futures which are explicitly about parallelism.
Eventually evaluating a promise in parallel invalidates the whole laziness idea: it prevents one to implement infinite streams with finite memory for instance.
Scheme-reports mailing list