summaryrefslogtreecommitdiff
path: root/doc/ref/scheme-scheduling.texi
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2004-01-20 00:32:46 +0000
committerKevin Ryde <user42@zip.com.au>2004-01-20 00:32:46 +0000
commit8212ef316be479ca2d74a1ca9b3b276fc6fc5ed8 (patch)
tree2957ea7a1635d8a3cceae7262358322ee8ae462d /doc/ref/scheme-scheduling.texi
parentde5eb61998591242188b94b12325f318d69123f5 (diff)
downloadguile-8212ef316be479ca2d74a1ca9b3b276fc6fc5ed8.tar.gz
(Higher level thread procedures): In monitor,
don't let "newly created" suggest a mutex created on every evaluation. Note what "monitor" means.
Diffstat (limited to 'doc/ref/scheme-scheduling.texi')
-rw-r--r--doc/ref/scheme-scheduling.texi13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/ref/scheme-scheduling.texi b/doc/ref/scheme-scheduling.texi
index e156d1bfc..74c138c88 100644
--- a/doc/ref/scheme-scheduling.texi
+++ b/doc/ref/scheme-scheduling.texi
@@ -438,9 +438,16 @@ Lock mutex @var{m}, evaluate @var{body}, and then unlock @var{m}.
These sub-operations form the branches of a @code{dynamic-wind}.
@end deffn
-@deffn macro monitor first [rest@dots{}]
-Evaluate forms @var{first} and @var{rest} under a newly created
-anonymous mutex, using @code{with-mutex}.
+@deffn macro monitor body@dots{}
+Evaluate @var{body}, with a mutex locked so only one thread can
+execute that code at any one time. Each @code{monitor} form has its
+own private mutex and the locking is done as per @code{with-mutex}
+above. The return value is the return from the last form in
+@var{body}.
+
+The term ``monitor'' comes from operating system theory, where it
+means a particular bit of code managing access to some resource and
+which only ever executes on behalf of one process at any one time.
@end deffn
@node C level thread interface