X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Fmanual%2Fthreading.texinfo;h=759ab0f8fc8e6d8e463bda2b8edb38ffd5fecfa2;hb=b5c69cfe906a31ae57bb0f18c67af9d2eaa1dfef;hp=f4ef3a1face228628a8207ae00b1d0964af45183;hpb=0368c43d62d6746dd8a2cb634998b4587f28f015;p=sbcl.git diff --git a/doc/manual/threading.texinfo b/doc/manual/threading.texinfo index f4ef3a1..759ab0f 100644 --- a/doc/manual/threading.texinfo +++ b/doc/manual/threading.texinfo @@ -9,8 +9,9 @@ multiprocessing on machines that have more than one CPU, but it does not allow Lisp control of the scheduler. This is found in the SB-THREAD package. -This requires x86/x86-64 and Linux kernel 2.6 or systems with NPTL -backports. +This requires Linux (2.6+ or systems with NPTL backports) running on the +x86 or x86-64 architecture, or SunOS (Solaris) on the x86. Support for +threading on Darwin (Mac OS X) and FreeBSD on the x86 is experimental. @menu * Threading basics:: @@ -32,6 +33,9 @@ backports. @include struct-sb-thread-thread.texinfo @include var-sb-thread-star-current-thread-star.texinfo @include fun-sb-thread-make-thread.texinfo +@include fun-sb-thread-join-thread.texinfo +@include condition-sb-thread-join-thread-error.texinfo +@include fun-sb-thread-join-thread-error-thread.texinfo @include fun-sb-thread-thread-alive-p.texinfo @include fun-sb-thread-list-all-threads.texinfo @include condition-sb-thread-interrupt-thread-error.texinfo @@ -44,17 +48,16 @@ backports. @section Special Variables The interaction of special variables with multiple threads is mostly -as one would expect, but users of other Lisps are warned that the -behaviour of locally bound specials differs in places from what they -may expect. +as one would expect, with behaviour very similar to other +implementations. @itemize -@item +@item global special values are visible across all threads; @item bindings (e.g. using LET) are local to the thread; @item -initial values in a new thread are taken from the thread that created it. +threads do not inherit dynamic bindings from the parent thread @end itemize The last point means that @@ -65,8 +68,8 @@ The last point means that (sb-thread:make-thread (lambda () (print *x*)))) @end lisp -prints @code{1}. - +prints @code{0} and not @code{1} as of 0.9.6. + @node Mutex Support @comment node-name, next, previous, up @section Mutex Support @@ -92,7 +95,7 @@ if you want a bounded wait. (with-mutex (*a-mutex*) (format t "Thread ~A got the lock~%" *current-thread*) (sleep (random 5))) - (format t "Thread ~A dropped lock, dying now~%" *current-thread*))) + (format t "Thread ~A dropped lock, dying now~%" *current-thread*)) (make-thread #'thread-fn) (make-thread #'thread-fn)