[plt-dev] Parallel Futures Release

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Dec 7 14:38:39 EST 2009

It think the short answer is just that we're not there yet. Those two
should be similar, modulo the issues discussed in the documtation wrt
to the runtime system and the fact that futures actually run in
parallel where threads will always be so-called "green" threads.


On Mon, Dec 7, 2009 at 1:36 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:
> Congratulations on your initial release!
> My question: How do futures relate to the existing constructs, such as
> thread-local cells, parameters, and custodians? (Eli raised some questions
> about the last one. It would be nice to fit futures gracefully into the
> existing framework.)
> It would be nice if futures could be though of as similar to threads but
> with special scheduling. For example, if
>   (let ([f (future (lambda () E1))])
>     E2
>     (touch f))
>   =
>   (let* ([chan (make-channel)]
>          [t (thread (lambda () (channel-put chan E1)))])
>     E2
>     (channel-get chan))
> with respect to thread-local state, shut-down-ability, etc. Or if they need
> to be different, I'm curious why.
> Ryan
> On Dec 7, 2009, at 12:31 PM, James Swaine wrote:
> I'm pleased to announce the initial release of parallel futures, a
> construct for fine-grained parallelism in PLT. Roughly speaking, a
> programmer passes a thunk to 'future' and it gets run in parallel.
> That "roughly" holds a few gotchas, partly because we're just getting
> started and partly due to the technique we're using. See the
> documentation for more details:
>  http://pre.plt-scheme.org/docs/html/futures/
> If you've got a multicore machine where you can't keep the cores busy
> or your office/machine room is a bit cold, try this program:
> #lang scheme
> (require scheme/futures)
> (define (loop) (loop))
> (for-each
>  touch
>  (for/list ([i (in-range 0 (processor-count))])
>   (future loop)))
> Note that you have to build mzscheme with futures; it isn't enabled by
> default, but see the docs above for how to do that. Beyond the above,
> we've also gotten a few parallel kernels going and are seeing good
> scalability up to 8 cores (the biggest machine we have around for the
> time being).
> Many thanks to Matthew, Robby, Kevin, and Peter Dinda, without whom this
> release wouldn't have been possible.
> Feedback welcome!
> James _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-dev
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Posted on the dev mailing list.