[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
Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-92-gf4e45e9
Wed, 08 Jun 2011 23:05:03 +0200
Gnus/5.110017 (No Gnus v0.17) Emacs/24.0.50 (gnu/linux)
"Andy Wingo" <address@hidden> skribis:
> commit f4e45e91f265429ad1c42d3905dd3c05a0bc0924
> Author: Andy Wingo <address@hidden>
> Date: Thu May 26 18:14:32 2011 +0200
> lazily init futures worker pool
> * module/ice-9/futures.scm (%workers, %create-workers!)
> (create-workers!): Define a mechanism to spawn off the future threads
> only when the first future is created.
> (make-future): Call create-workers! here.
> "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
> + (create-workers!)
Wouldn't it be more efficient to instead do:
(if (null? %workers)
Once the workers are created, that would leave 0 function calls.
- Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-92-gf4e45e9,
Ludovic Courtès <=