[plt-dev] Parallel Futures Release

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

On Mon, Dec 7, 2009 at 1:13 PM, Sam TH <samth at ccs.neu.edu> wrote:
> On Mon, Dec 7, 2009 at 12:31 PM, James Swaine <james.swaine at gmail.com> 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:
>
> A question about the semantics:
>
> When a `future' blocks because it calls a non-threadsafe primitive,
> why not put it in a new `thread', so that it continues to run
> concurrently, rather than blocking?  That way if the main thread
> blocks (waiting for input, or something like that), the computation
> would continue.

For now, one could do that at the Scheme level already (although this
requires rewriting the program in some cases). We don't yet have
enough experience to say, one way or the other, if it is the right
default thing to do. So far, our limited experience is "if you want it
to go fast, just don't have any of those operations at all in there"
with a healthy dose of "maybe that won't work with futures: try
places" ....

Robby


Posted on the dev mailing list.