| 1 | \paragraph{} |
|---|
| 2 | \label{THREADS:*THREADING-MODEL*} |
|---|
| 3 | \index{*THREADING-MODEL*} |
|---|
| 4 | --- Variable: \textbf{*threading-model*} [\textbf{threads}] \textit{} |
|---|
| 5 | |
|---|
| 6 | \begin{adjustwidth}{5em}{5em} |
|---|
| 7 | not-documented |
|---|
| 8 | \end{adjustwidth} |
|---|
| 9 | |
|---|
| 10 | \paragraph{} |
|---|
| 11 | \label{THREADS:CURRENT-THREAD} |
|---|
| 12 | \index{CURRENT-THREAD} |
|---|
| 13 | --- Function: \textbf{current-thread} [\textbf{threads}] \textit{} |
|---|
| 14 | |
|---|
| 15 | \begin{adjustwidth}{5em}{5em} |
|---|
| 16 | Returns a reference to invoking thread. |
|---|
| 17 | \end{adjustwidth} |
|---|
| 18 | |
|---|
| 19 | \paragraph{} |
|---|
| 20 | \label{THREADS:DESTROY-THREAD} |
|---|
| 21 | \index{DESTROY-THREAD} |
|---|
| 22 | --- Function: \textbf{destroy-thread} [\textbf{threads}] \textit{} |
|---|
| 23 | |
|---|
| 24 | \begin{adjustwidth}{5em}{5em} |
|---|
| 25 | not-documented |
|---|
| 26 | \end{adjustwidth} |
|---|
| 27 | |
|---|
| 28 | \paragraph{} |
|---|
| 29 | \label{THREADS:GET-JAVA-THREAD} |
|---|
| 30 | \index{GET-JAVA-THREAD} |
|---|
| 31 | --- Function: \textbf{get-java-thread} [\textbf{threads}] \textit{\&optional lisp-thread} |
|---|
| 32 | |
|---|
| 33 | \begin{adjustwidth}{5em}{5em} |
|---|
| 34 | Without an argument, return the underlying currently executing Java thread |
|---|
| 35 | |
|---|
| 36 | Specified with a LISP-THREAD, return that thread's wrapped Java |
|---|
| 37 | thread. |
|---|
| 38 | \end{adjustwidth} |
|---|
| 39 | |
|---|
| 40 | \paragraph{} |
|---|
| 41 | \label{THREADS:GET-MUTEX} |
|---|
| 42 | \index{GET-MUTEX} |
|---|
| 43 | --- Function: \textbf{get-mutex} [\textbf{threads}] \textit{mutex} |
|---|
| 44 | |
|---|
| 45 | \begin{adjustwidth}{5em}{5em} |
|---|
| 46 | Acquires the lock associated with the MUTEX |
|---|
| 47 | \end{adjustwidth} |
|---|
| 48 | |
|---|
| 49 | \paragraph{} |
|---|
| 50 | \label{THREADS:INTERRUPT-THREAD} |
|---|
| 51 | \index{INTERRUPT-THREAD} |
|---|
| 52 | --- Function: \textbf{interrupt-thread} [\textbf{threads}] \textit{thread function \&rest args} |
|---|
| 53 | |
|---|
| 54 | \begin{adjustwidth}{5em}{5em} |
|---|
| 55 | Interrupts THREAD and forces it to apply FUNCTION to ARGS. |
|---|
| 56 | When the function returns, the thread's original computation continues. If multiple interrupts are queued for a thread, they are all run, but the order is not guaranteed. |
|---|
| 57 | \end{adjustwidth} |
|---|
| 58 | |
|---|
| 59 | \paragraph{} |
|---|
| 60 | \label{THREADS:MAILBOX-EMPTY-P} |
|---|
| 61 | \index{MAILBOX-EMPTY-P} |
|---|
| 62 | --- Function: \textbf{mailbox-empty-p} [\textbf{threads}] \textit{mailbox} |
|---|
| 63 | |
|---|
| 64 | \begin{adjustwidth}{5em}{5em} |
|---|
| 65 | Returns non-NIL if the mailbox can be read from, NIL otherwise. |
|---|
| 66 | \end{adjustwidth} |
|---|
| 67 | |
|---|
| 68 | \paragraph{} |
|---|
| 69 | \label{THREADS:MAILBOX-PEEK} |
|---|
| 70 | \index{MAILBOX-PEEK} |
|---|
| 71 | --- Function: \textbf{mailbox-peek} [\textbf{threads}] \textit{mailbox} |
|---|
| 72 | |
|---|
| 73 | \begin{adjustwidth}{5em}{5em} |
|---|
| 74 | Returns two values. The second returns non-NIL when the mailbox |
|---|
| 75 | is empty. The first is the next item to be read from the mailbox. |
|---|
| 76 | |
|---|
| 77 | Note that due to multi-threading, the first value returned upon |
|---|
| 78 | peek, may be different from the one returned upon next read in the |
|---|
| 79 | calling thread. |
|---|
| 80 | \end{adjustwidth} |
|---|
| 81 | |
|---|
| 82 | \paragraph{} |
|---|
| 83 | \label{THREADS:MAILBOX-READ} |
|---|
| 84 | \index{MAILBOX-READ} |
|---|
| 85 | --- Function: \textbf{mailbox-read} [\textbf{threads}] \textit{mailbox} |
|---|
| 86 | |
|---|
| 87 | \begin{adjustwidth}{5em}{5em} |
|---|
| 88 | Blocks on the mailbox until an item is available for reading. |
|---|
| 89 | When an item is available, it is returned. |
|---|
| 90 | \end{adjustwidth} |
|---|
| 91 | |
|---|
| 92 | \paragraph{} |
|---|
| 93 | \label{THREADS:MAILBOX-SEND} |
|---|
| 94 | \index{MAILBOX-SEND} |
|---|
| 95 | --- Function: \textbf{mailbox-send} [\textbf{threads}] \textit{mailbox item} |
|---|
| 96 | |
|---|
| 97 | \begin{adjustwidth}{5em}{5em} |
|---|
| 98 | Sends an item into the mailbox, notifying 1 waiter |
|---|
| 99 | to wake up for retrieval of that object. |
|---|
| 100 | \end{adjustwidth} |
|---|
| 101 | |
|---|
| 102 | \paragraph{} |
|---|
| 103 | \label{THREADS:MAKE-MAILBOX} |
|---|
| 104 | \index{MAKE-MAILBOX} |
|---|
| 105 | --- Function: \textbf{make-mailbox} [\textbf{threads}] \textit{\&key ((queue g305716) NIL)} |
|---|
| 106 | |
|---|
| 107 | \begin{adjustwidth}{5em}{5em} |
|---|
| 108 | not-documented |
|---|
| 109 | \end{adjustwidth} |
|---|
| 110 | |
|---|
| 111 | \paragraph{} |
|---|
| 112 | \label{THREADS:MAKE-MUTEX} |
|---|
| 113 | \index{MAKE-MUTEX} |
|---|
| 114 | --- Function: \textbf{make-mutex} [\textbf{threads}] \textit{\&key ((in-use g305979) NIL)} |
|---|
| 115 | |
|---|
| 116 | \begin{adjustwidth}{5em}{5em} |
|---|
| 117 | not-documented |
|---|
| 118 | \end{adjustwidth} |
|---|
| 119 | |
|---|
| 120 | \paragraph{} |
|---|
| 121 | \label{THREADS:MAKE-THREAD} |
|---|
| 122 | \index{MAKE-THREAD} |
|---|
| 123 | --- Function: \textbf{make-thread} [\textbf{threads}] \textit{function \&key name} |
|---|
| 124 | |
|---|
| 125 | \begin{adjustwidth}{5em}{5em} |
|---|
| 126 | not-documented |
|---|
| 127 | \end{adjustwidth} |
|---|
| 128 | |
|---|
| 129 | \paragraph{} |
|---|
| 130 | \label{THREADS:MAKE-THREAD-LOCK} |
|---|
| 131 | \index{MAKE-THREAD-LOCK} |
|---|
| 132 | --- Function: \textbf{make-thread-lock} [\textbf{threads}] \textit{} |
|---|
| 133 | |
|---|
| 134 | \begin{adjustwidth}{5em}{5em} |
|---|
| 135 | Returns an object to be used with the WITH-THREAD-LOCK macro. |
|---|
| 136 | \end{adjustwidth} |
|---|
| 137 | |
|---|
| 138 | \paragraph{} |
|---|
| 139 | \label{THREADS:MAPCAR-THREADS} |
|---|
| 140 | \index{MAPCAR-THREADS} |
|---|
| 141 | --- Function: \textbf{mapcar-threads} [\textbf{threads}] \textit{} |
|---|
| 142 | |
|---|
| 143 | \begin{adjustwidth}{5em}{5em} |
|---|
| 144 | not-documented |
|---|
| 145 | \end{adjustwidth} |
|---|
| 146 | |
|---|
| 147 | \paragraph{} |
|---|
| 148 | \label{THREADS:OBJECT-NOTIFY} |
|---|
| 149 | \index{OBJECT-NOTIFY} |
|---|
| 150 | --- Function: \textbf{object-notify} [\textbf{threads}] \textit{object} |
|---|
| 151 | |
|---|
| 152 | \begin{adjustwidth}{5em}{5em} |
|---|
| 153 | Wakes up a single thread that is waiting on OBJECT's monitor. |
|---|
| 154 | If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation. A thread waits on an object's monitor by calling one of the wait methods. |
|---|
| 155 | \end{adjustwidth} |
|---|
| 156 | |
|---|
| 157 | \paragraph{} |
|---|
| 158 | \label{THREADS:OBJECT-NOTIFY-ALL} |
|---|
| 159 | \index{OBJECT-NOTIFY-ALL} |
|---|
| 160 | --- Function: \textbf{object-notify-all} [\textbf{threads}] \textit{object} |
|---|
| 161 | |
|---|
| 162 | \begin{adjustwidth}{5em}{5em} |
|---|
| 163 | Wakes up all threads that are waiting on this OBJECT's monitor. |
|---|
| 164 | A thread waits on an object's monitor by calling one of the wait methods. |
|---|
| 165 | \end{adjustwidth} |
|---|
| 166 | |
|---|
| 167 | \paragraph{} |
|---|
| 168 | \label{THREADS:OBJECT-WAIT} |
|---|
| 169 | \index{OBJECT-WAIT} |
|---|
| 170 | --- Function: \textbf{object-wait} [\textbf{threads}] \textit{object \&optional timeout} |
|---|
| 171 | |
|---|
| 172 | \begin{adjustwidth}{5em}{5em} |
|---|
| 173 | Causes the current thread to block until object-notify or object-notify-all is called on OBJECT. |
|---|
| 174 | Optionally unblock execution after TIMEOUT seconds. A TIMEOUT of zero |
|---|
| 175 | means to wait indefinitely. |
|---|
| 176 | A non-zero TIMEOUT of less than a nanosecond is interpolated as a nanosecond wait. |
|---|
| 177 | See the documentation of java.lang.Object.wait() for further |
|---|
| 178 | information. |
|---|
| 179 | |
|---|
| 180 | \end{adjustwidth} |
|---|
| 181 | |
|---|
| 182 | \paragraph{} |
|---|
| 183 | \label{THREADS:RELEASE-MUTEX} |
|---|
| 184 | \index{RELEASE-MUTEX} |
|---|
| 185 | --- Function: \textbf{release-mutex} [\textbf{threads}] \textit{mutex} |
|---|
| 186 | |
|---|
| 187 | \begin{adjustwidth}{5em}{5em} |
|---|
| 188 | Releases a lock associated with MUTEX |
|---|
| 189 | \end{adjustwidth} |
|---|
| 190 | |
|---|
| 191 | \paragraph{} |
|---|
| 192 | \label{THREADS:SYNCHRONIZED-ON} |
|---|
| 193 | \index{SYNCHRONIZED-ON} |
|---|
| 194 | --- Special Operator: \textbf{synchronized-on} [\textbf{threads}] \textit{} |
|---|
| 195 | |
|---|
| 196 | \begin{adjustwidth}{5em}{5em} |
|---|
| 197 | not-documented |
|---|
| 198 | \end{adjustwidth} |
|---|
| 199 | |
|---|
| 200 | \paragraph{} |
|---|
| 201 | \label{THREADS:THREAD} |
|---|
| 202 | \index{THREAD} |
|---|
| 203 | --- Class: \textbf{thread} [\textbf{threads}] \textit{} |
|---|
| 204 | |
|---|
| 205 | \begin{adjustwidth}{5em}{5em} |
|---|
| 206 | not-documented |
|---|
| 207 | \end{adjustwidth} |
|---|
| 208 | |
|---|
| 209 | \paragraph{} |
|---|
| 210 | \label{THREADS:THREAD-ALIVE-P} |
|---|
| 211 | \index{THREAD-ALIVE-P} |
|---|
| 212 | --- Function: \textbf{thread-alive-p} [\textbf{threads}] \textit{thread} |
|---|
| 213 | |
|---|
| 214 | \begin{adjustwidth}{5em}{5em} |
|---|
| 215 | Boolean predicate whether THREAD is alive. |
|---|
| 216 | \end{adjustwidth} |
|---|
| 217 | |
|---|
| 218 | \paragraph{} |
|---|
| 219 | \label{THREADS:THREAD-FUNCTION-WRAPPER} |
|---|
| 220 | \index{THREAD-FUNCTION-WRAPPER} |
|---|
| 221 | --- Function: \textbf{thread-function-wrapper} [\textbf{threads}] \textit{function} |
|---|
| 222 | |
|---|
| 223 | \begin{adjustwidth}{5em}{5em} |
|---|
| 224 | Call FUNCTION with a simple abort restart |
|---|
| 225 | \end{adjustwidth} |
|---|
| 226 | |
|---|
| 227 | \paragraph{} |
|---|
| 228 | \label{THREADS:THREAD-JOIN} |
|---|
| 229 | \index{THREAD-JOIN} |
|---|
| 230 | --- Function: \textbf{thread-join} [\textbf{threads}] \textit{thread} |
|---|
| 231 | |
|---|
| 232 | \begin{adjustwidth}{5em}{5em} |
|---|
| 233 | Waits for THREAD to die before resuming execution |
|---|
| 234 | Returns the result of the joined thread as its primary value. |
|---|
| 235 | Returns T if the joined thread finishes normally or NIL if it was interrupted. |
|---|
| 236 | \end{adjustwidth} |
|---|
| 237 | |
|---|
| 238 | \paragraph{} |
|---|
| 239 | \label{THREADS:THREAD-NAME} |
|---|
| 240 | \index{THREAD-NAME} |
|---|
| 241 | --- Function: \textbf{thread-name} [\textbf{threads}] \textit{} |
|---|
| 242 | |
|---|
| 243 | \begin{adjustwidth}{5em}{5em} |
|---|
| 244 | not-documented |
|---|
| 245 | \end{adjustwidth} |
|---|
| 246 | |
|---|
| 247 | \paragraph{} |
|---|
| 248 | \label{THREADS:THREADP} |
|---|
| 249 | \index{THREADP} |
|---|
| 250 | --- Function: \textbf{threadp} [\textbf{threads}] \textit{} |
|---|
| 251 | |
|---|
| 252 | \begin{adjustwidth}{5em}{5em} |
|---|
| 253 | not-documented |
|---|
| 254 | \end{adjustwidth} |
|---|
| 255 | |
|---|
| 256 | \paragraph{} |
|---|
| 257 | \label{THREADS:WITH-MUTEX} |
|---|
| 258 | \index{WITH-MUTEX} |
|---|
| 259 | --- Macro: \textbf{with-mutex} [\textbf{threads}] \textit{} |
|---|
| 260 | |
|---|
| 261 | \begin{adjustwidth}{5em}{5em} |
|---|
| 262 | Acquires a lock on MUTEX, executes BODY, and then releases the lock |
|---|
| 263 | \end{adjustwidth} |
|---|
| 264 | |
|---|
| 265 | \paragraph{} |
|---|
| 266 | \label{THREADS:WITH-THREAD-LOCK} |
|---|
| 267 | \index{WITH-THREAD-LOCK} |
|---|
| 268 | --- Macro: \textbf{with-thread-lock} [\textbf{threads}] \textit{} |
|---|
| 269 | |
|---|
| 270 | \begin{adjustwidth}{5em}{5em} |
|---|
| 271 | Acquires the LOCK, executes BODY and releases the LOCK |
|---|
| 272 | \end{adjustwidth} |
|---|
| 273 | |
|---|
| 274 | \paragraph{} |
|---|
| 275 | \label{THREADS:YIELD} |
|---|
| 276 | \index{YIELD} |
|---|
| 277 | --- Function: \textbf{yield} [\textbf{threads}] \textit{} |
|---|
| 278 | |
|---|
| 279 | \begin{adjustwidth}{5em}{5em} |
|---|
| 280 | A hint to the scheduler that the current thread is willing to yield its current use of a processor. The scheduler is free to ignore this hint. |
|---|
| 281 | |
|---|
| 282 | See java.lang.Thread.yield(). |
|---|
| 283 | \end{adjustwidth} |
|---|
| 284 | |
|---|