Coverage report: /home/ellis/.stash/quicklisp/dists/ultralisp/software/sionescu-bordeaux-threads-20250412101706/apiv1/pkgdcl.lisp
Kind | Covered | All | % |
expression | 0 | 1 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;;; -*- Mode: LISP; Syntax: ANSI-Common-lisp; Base: 10; Package: CL-USER -*-
2
;;;; The above modeline is required for Genera. Do not change.
4
(cl:defpackage :bordeaux-threads
6
(:use #:cl #:alexandria)
8
(:import-from :java #:jnew #:jcall #:jmethod)
9
(:export #:thread #:make-thread #:current-thread #:threadp #:thread-name
10
#:start-multiprocessing
11
#:*default-special-bindings* #:*standard-io-bindings*
12
#:*supports-threads-p*
14
#:lock #:make-lock #:lock-p
15
#:acquire-lock #:release-lock #:with-lock-held
17
#:recursive-lock #:make-recursive-lock #:recursive-lock-p
18
#:acquire-recursive-lock #:release-recursive-lock #:with-recursive-lock-held
20
#:make-condition-variable #:condition-wait #:condition-notify
22
#:make-semaphore #:signal-semaphore #:wait-on-semaphore #:semaphore #:semaphore-p
24
#:with-timeout #:timeout
26
#:all-threads #:interrupt-thread #:destroy-thread #:thread-alive-p
27
#:join-thread #:thread-yield)
28
(:documentation "BORDEAUX-THREADS is a proposed standard for a minimal
29
MP/threading interface. It is similar to the CLIM-SYS threading and
30
lock support, but for the following broad differences:
32
1) Some behaviours are defined in additional detail: attention has
33
been given to special variable interaction, whether and when
34
cleanup forms are run. Some behaviours are defined in less
35
detail: an implementation that does not support multiple
36
threads is not required to use a new list (nil) for a lock, for
39
2) Many functions which would be difficult, dangerous or inefficient
40
to provide on some implementations have been removed. Chiefly
41
these are functions such as thread-wait which expect for
42
efficiency that the thread scheduler is written in Lisp and
43
'hookable', which can't sensibly be done if the scheduler is
44
external to the Lisp image, or the system has more than one CPU.
46
3) Unbalanced ACQUIRE-LOCK and RELEASE-LOCK functions have been
49
4) Posix-style condition variables have been added, as it's not
50
otherwise possible to implement them correctly using the other
51
operations that are specified.
53
Threads may be implemented using whatever applicable techniques are
54
provided by the operating system: user-space scheduling,
55
kernel-based LWPs or anything else that does the job.
57
Some parts of this specification can also be implemented in a Lisp
58
that does not support multiple threads. Thread creation and some
59
thread inspection operations will not work, but the locking
60
functions are still present (though they may do nothing) so that
61
thread-safe code can be compiled on both multithread and
62
single-thread implementations without need of conditionals.
64
To avoid conflict with existing MP/threading interfaces in
65
implementations, these symbols live in the BORDEAUX-THREADS package.
66
Implementations and/or users may also make them visible or exported
67
in other more traditionally named packages."))