summaryrefslogtreecommitdiff
path: root/doc/ref/api-scheduling.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ref/api-scheduling.texi')
-rw-r--r--doc/ref/api-scheduling.texi10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/ref/api-scheduling.texi b/doc/ref/api-scheduling.texi
index 28e90e3d1..d202f4a69 100644
--- a/doc/ref/api-scheduling.texi
+++ b/doc/ref/api-scheduling.texi
@@ -848,12 +848,18 @@ machine, though, the computation of @code{(find prime? lst2)} may be
done in parallel with that of the other @code{find} call, which can
reduce the execution time of @code{find-prime}.
+Note that futures are intended for the evaluation of purely functional
+expressions. Expressions that have side-effects or rely on I/O may
+require additional care, such as explicit synchronization
+(@pxref{Mutexes and Condition Variables}).
+
Guile's futures are implemented on top of POSIX threads
(@pxref{Threads}). Internally, a fixed-size pool of threads is used to
evaluate futures, such that offloading the evaluation of an expression
to another thread doesn't incur thread creation costs. By default, the
-pool contains one thread per CPU core, minus one, to account for the
-main thread.
+pool contains one thread per available CPU core, minus one, to account
+for the main thread. The number of available CPU cores is determined
+using @code{current-processor-count} (@pxref{Processes}).
@deffn {Scheme Syntax} future exp
Return a future for expression @var{exp}. This is equivalent to: