1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-lisp; Base: 10; Package: CL-USER -*-
2 ;;;; The above modeline is required for Genera. Do not change.
4 (defpackage :bordeaux-threads-2
6 (:use
:common-lisp
:alexandria
:global-vars
)
8 (:import-from
:java
#:jnew
#:jcall
#:jclass
#:jmethod
)
10 (:import-from
:sb-ext
#:timeout
)
13 #:*supports-threads-p
*
14 #:bordeaux-threads-error
21 #:thread-native-thread
24 #:*default-special-bindings
*
25 #:*standard-io-bindings
*
28 #:start-multiprocessing
38 #:abnormal-exit-condition
51 #:native-recursive-lock
52 #:native-recursive-lock-p
60 #:acquire-recursive-lock
61 #:release-recursive-lock
62 #:with-recursive-lock-held
)
64 ;; Condition variables
67 #:condition-variable-p
68 #:make-condition-variable
71 #:condition-broadcast
)
84 #:atomic-integer-compare-and-swap
87 #:atomic-integer-value
)
94 (:documentation
"BORDEAUX-THREADS is a proposed standard for a minimal
95 MP/threading interface. It is similar to the CLIM-SYS threading and
96 lock support, but for the following broad differences:
98 1) Some behaviours are defined in additional detail: attention has
99 been given to special variable interaction, whether and when
100 cleanup forms are run. Some behaviours are defined in less
101 detail: an implementation that does not support multiple
102 threads is not required to use a new list (nil) for a lock, for
105 2) Many functions which would be difficult, dangerous or inefficient
106 to provide on some implementations have been removed. Chiefly
107 these are functions such as thread-wait which expect for
108 efficiency that the thread scheduler is written in Lisp and
109 'hookable', which can't sensibly be done if the scheduler is
110 external to the Lisp image, or the system has more than one CPU.
112 3) Unbalanced ACQUIRE-LOCK and RELEASE-LOCK functions have been
115 4) Posix-style condition variables have been added, as it's not
116 otherwise possible to implement them correctly using the other
117 operations that are specified.
119 Threads may be implemented using whatever applicable techniques are
120 provided by the operating system: user-space scheduling,
121 kernel-based LWPs or anything else that does the job.
123 To avoid conflict with existing MP/threading interfaces in
124 implementations, these symbols live in the BORDEAUX-THREADS-2 package.
125 Implementations and/or users may also make them visible or exported
126 in other more traditionally named packages."))