summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-12-07 23:11:53 +0100
committerLudovic Courtès <ludo@gnu.org>2010-12-07 23:13:20 +0100
commit51fc066ae25a0e1aa272a2eba9ecd7b42dc9ea41 (patch)
tree90cf2f7f2e0e9524e10f2de828208c791a3ddeef /module
parentf0c0141fe4bd478edc8205b1eae793f0474d4aa3 (diff)
downloadguile-51fc066ae25a0e1aa272a2eba9ecd7b42dc9ea41.tar.gz
Use `current-processor-count' to determine the number of future-workers.
* module/ice-9/futures.scm (%worker-count): Use `current-processor-count'. * doc/ref/api-scheduling.texi (Futures): Add note about side-effects and I/O. Mention `current-processor-count'.
Diffstat (limited to 'module')
-rw-r--r--module/ice-9/futures.scm4
1 files changed, 1 insertions, 3 deletions
diff --git a/module/ice-9/futures.scm b/module/ice-9/futures.scm
index b2e4c0da5..1e9247dce 100644
--- a/module/ice-9/futures.scm
+++ b/module/ice-9/futures.scm
@@ -146,9 +146,7 @@ touched."
(define %worker-count
(if (provided? 'threads)
- (if (defined? 'getaffinity)
- (- (bit-count #t (getaffinity (getpid))) 1)
- 3) ;; FIXME: use Gnulib's `nproc' here.
+ (- (current-processor-count) 1)
0))
(define %workers