[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-92-gf4

From: Andy Wingo
Subject: Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-92-gf4e45e9
Date: Thu, 09 Jun 2011 15:25:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Heya :)

On Wed 08 Jun 2011 23:05, address@hidden (Ludovic Courtès) writes:

> "Andy Wingo" <address@hidden> skribis:
>>    "Return a new future for THUNK.  Execution may start at any point
>>  concurrently, or it can start at the time when the returned future is
>>  touched."
>> +  (create-workers!)
> Wouldn't it be more efficient to instead do:
>   (if (null? %workers)
>       (%create-workers!))
> Once the workers are created, that would leave 0 function calls.

Possibly, but isn't there a race condition if you do that though?
Consider two calls to make-future from different threads, before the
workers set has been spawned.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]