[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-65-g134c95
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-65-g134c95f |
Date: |
Sat, 03 Nov 2012 00:05:33 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=134c95f1e6a574d30881cf3ccaffba5e3c39cca4
The branch, stable-2.0 has been updated
via 134c95f1e6a574d30881cf3ccaffba5e3c39cca4 (commit)
from 1d4e6ee3013b2c0bebf7d715318e6c493f41ee19 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 134c95f1e6a574d30881cf3ccaffba5e3c39cca4
Author: Ludovic Courtès <address@hidden>
Date: Sat Nov 3 01:05:19 2012 +0100
futures: Have workers work when futures are available.
Reported by David Pirotte.
* module/ice-9/futures.scm (process-futures): Wait on %FUTURES-AVAILABLE
only when %FUTURES is empty.
The problem was obvious when running (begin (use-modules (ice-9
threads)) (par-map 1+ (iota 400000))) : eventually, only the main
thread would do the work, while the others would remain idle, waiting
on %FUTURES-AVAILABLE.
-----------------------------------------------------------------------
Summary of changes:
module/ice-9/futures.scm | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/futures.scm b/module/ice-9/futures.scm
index 3c4cd7d..2ab3edd 100644
--- a/module/ice-9/futures.scm
+++ b/module/ice-9/futures.scm
@@ -93,8 +93,10 @@ touched."
;; Wait for futures to be available and process them.
(lock-mutex %futures-mutex)
(let loop ()
- (wait-condition-variable %futures-available
- %futures-mutex)
+ (when (q-empty? %futures)
+ (wait-condition-variable %futures-available
+ %futures-mutex))
+
(or (q-empty? %futures)
(let ((future (deq! %futures)))
(lock-mutex (future-mutex future))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-65-g134c95f,
Ludovic Courtès <=