source: tags/1.5.0/doc/manual/threads.tex

Last change on this file was 15042, checked in by Mark Evenson, 7 years ago

abcl-1.5.0-rc-0: drop support for Java 5

Initial documentation and metadata update for ABCL 1.5.0.

File size: 6.9 KB
Line 
1\paragraph{}
2\label{THREADS:CURRENT-THREAD}
3\index{CURRENT-THREAD}
4--- Function: \textbf{current-thread} [\textbf{threads}] \textit{}
5
6\begin{adjustwidth}{5em}{5em}
7Returns a reference to invoking thread.
8\end{adjustwidth}
9
10\paragraph{}
11\label{THREADS:DESTROY-THREAD}
12\index{DESTROY-THREAD}
13--- Function: \textbf{destroy-thread} [\textbf{threads}] \textit{}
14
15\begin{adjustwidth}{5em}{5em}
16not-documented
17\end{adjustwidth}
18
19\paragraph{}
20\label{THREADS:GET-MUTEX}
21\index{GET-MUTEX}
22--- Function: \textbf{get-mutex} [\textbf{threads}] \textit{mutex}
23
24\begin{adjustwidth}{5em}{5em}
25Acquires a lock on the `mutex'.
26\end{adjustwidth}
27
28\paragraph{}
29\label{THREADS:INTERRUPT-THREAD}
30\index{INTERRUPT-THREAD}
31--- Function: \textbf{interrupt-thread} [\textbf{threads}] \textit{thread function \&rest args}
32
33\begin{adjustwidth}{5em}{5em}
34Interrupts THREAD and forces it to apply FUNCTION to ARGS.
35When 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.
36\end{adjustwidth}
37
38\paragraph{}
39\label{THREADS:MAILBOX-EMPTY-P}
40\index{MAILBOX-EMPTY-P}
41--- Function: \textbf{mailbox-empty-p} [\textbf{threads}] \textit{mailbox}
42
43\begin{adjustwidth}{5em}{5em}
44Returns non-NIL if the mailbox can be read from, NIL otherwise.
45\end{adjustwidth}
46
47\paragraph{}
48\label{THREADS:MAILBOX-PEEK}
49\index{MAILBOX-PEEK}
50--- Function: \textbf{mailbox-peek} [\textbf{threads}] \textit{mailbox}
51
52\begin{adjustwidth}{5em}{5em}
53Returns two values. The second returns non-NIL when the mailbox
54is empty. The first is the next item to be read from the mailbox.
55
56Note that due to multi-threading, the first value returned upon
57peek, may be different from the one returned upon next read in the
58calling thread.
59\end{adjustwidth}
60
61\paragraph{}
62\label{THREADS:MAILBOX-READ}
63\index{MAILBOX-READ}
64--- Function: \textbf{mailbox-read} [\textbf{threads}] \textit{mailbox}
65
66\begin{adjustwidth}{5em}{5em}
67Blocks on the mailbox until an item is available for reading.
68When an item is available, it is returned.
69\end{adjustwidth}
70
71\paragraph{}
72\label{THREADS:MAILBOX-SEND}
73\index{MAILBOX-SEND}
74--- Function: \textbf{mailbox-send} [\textbf{threads}] \textit{mailbox item}
75
76\begin{adjustwidth}{5em}{5em}
77Sends an item into the mailbox, notifying 1 waiter
78to wake up for retrieval of that object.
79\end{adjustwidth}
80
81\paragraph{}
82\label{THREADS:MAKE-MAILBOX}
83\index{MAKE-MAILBOX}
84--- Function: \textbf{make-mailbox} [\textbf{threads}] \textit{\&key ((queue g284367) NIL)}
85
86\begin{adjustwidth}{5em}{5em}
87not-documented
88\end{adjustwidth}
89
90\paragraph{}
91\label{THREADS:MAKE-MUTEX}
92\index{MAKE-MUTEX}
93--- Function: \textbf{make-mutex} [\textbf{threads}] \textit{\&key ((in-use g284630) NIL)}
94
95\begin{adjustwidth}{5em}{5em}
96not-documented
97\end{adjustwidth}
98
99\paragraph{}
100\label{THREADS:MAKE-THREAD}
101\index{MAKE-THREAD}
102--- Function: \textbf{make-thread} [\textbf{threads}] \textit{function \&key name}
103
104\begin{adjustwidth}{5em}{5em}
105not-documented
106\end{adjustwidth}
107
108\paragraph{}
109\label{THREADS:MAKE-THREAD-LOCK}
110\index{MAKE-THREAD-LOCK}
111--- Function: \textbf{make-thread-lock} [\textbf{threads}] \textit{}
112
113\begin{adjustwidth}{5em}{5em}
114Returns an object to be used with the `with-thread-lock' macro.
115\end{adjustwidth}
116
117\paragraph{}
118\label{THREADS:MAPCAR-THREADS}
119\index{MAPCAR-THREADS}
120--- Function: \textbf{mapcar-threads} [\textbf{threads}] \textit{}
121
122\begin{adjustwidth}{5em}{5em}
123not-documented
124\end{adjustwidth}
125
126\paragraph{}
127\label{THREADS:OBJECT-NOTIFY}
128\index{OBJECT-NOTIFY}
129--- Function: \textbf{object-notify} [\textbf{threads}] \textit{object}
130
131\begin{adjustwidth}{5em}{5em}
132Wakes up a single thread that is waiting on OBJECT's monitor.
133If 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.
134\end{adjustwidth}
135
136\paragraph{}
137\label{THREADS:OBJECT-NOTIFY-ALL}
138\index{OBJECT-NOTIFY-ALL}
139--- Function: \textbf{object-notify-all} [\textbf{threads}] \textit{object}
140
141\begin{adjustwidth}{5em}{5em}
142Wakes up all threads that are waiting on this OBJECT's monitor.
143A thread waits on an object's monitor by calling one of the wait methods.
144\end{adjustwidth}
145
146\paragraph{}
147\label{THREADS:OBJECT-WAIT}
148\index{OBJECT-WAIT}
149--- Function: \textbf{object-wait} [\textbf{threads}] \textit{object \&optional timeout}
150
151\begin{adjustwidth}{5em}{5em}
152Causes the current thread to block until object-notify or object-notify-all is called on OBJECT.
153Optionally unblock execution after TIMEOUT seconds.  A TIMEOUT of zero
154means to wait indefinitely.
155A non-zero TIMEOUT of less than a nanosecond is interpolated as a nanosecond wait.
156See the documentation of java.lang.Object.wait() for further
157information.
158
159\end{adjustwidth}
160
161\paragraph{}
162\label{THREADS:RELEASE-MUTEX}
163\index{RELEASE-MUTEX}
164--- Function: \textbf{release-mutex} [\textbf{threads}] \textit{mutex}
165
166\begin{adjustwidth}{5em}{5em}
167Releases a lock on the `mutex'.
168\end{adjustwidth}
169
170\paragraph{}
171\label{THREADS:SYNCHRONIZED-ON}
172\index{SYNCHRONIZED-ON}
173--- Special Operator: \textbf{synchronized-on} [\textbf{threads}] \textit{}
174
175\begin{adjustwidth}{5em}{5em}
176not-documented
177\end{adjustwidth}
178
179\paragraph{}
180\label{THREADS:THREAD}
181\index{THREAD}
182--- Class: \textbf{thread} [\textbf{threads}] \textit{}
183
184\begin{adjustwidth}{5em}{5em}
185not-documented
186\end{adjustwidth}
187
188\paragraph{}
189\label{THREADS:THREAD-ALIVE-P}
190\index{THREAD-ALIVE-P}
191--- Function: \textbf{thread-alive-p} [\textbf{threads}] \textit{thread}
192
193\begin{adjustwidth}{5em}{5em}
194Boolean predicate whether THREAD is alive.
195\end{adjustwidth}
196
197\paragraph{}
198\label{THREADS:THREAD-JOIN}
199\index{THREAD-JOIN}
200--- Function: \textbf{thread-join} [\textbf{threads}] \textit{thread}
201
202\begin{adjustwidth}{5em}{5em}
203Waits for thread to finish.
204\end{adjustwidth}
205
206\paragraph{}
207\label{THREADS:THREAD-NAME}
208\index{THREAD-NAME}
209--- Function: \textbf{thread-name} [\textbf{threads}] \textit{}
210
211\begin{adjustwidth}{5em}{5em}
212not-documented
213\end{adjustwidth}
214
215\paragraph{}
216\label{THREADS:THREADP}
217\index{THREADP}
218--- Function: \textbf{threadp} [\textbf{threads}] \textit{}
219
220\begin{adjustwidth}{5em}{5em}
221not-documented
222\end{adjustwidth}
223
224\paragraph{}
225\label{THREADS:WITH-MUTEX}
226\index{WITH-MUTEX}
227--- Macro: \textbf{with-mutex} [\textbf{threads}] \textit{}
228
229\begin{adjustwidth}{5em}{5em}
230Acquires a lock on `mutex', executes the body
231and releases the lock.
232\end{adjustwidth}
233
234\paragraph{}
235\label{THREADS:WITH-THREAD-LOCK}
236\index{WITH-THREAD-LOCK}
237--- Macro: \textbf{with-thread-lock} [\textbf{threads}] \textit{}
238
239\begin{adjustwidth}{5em}{5em}
240Acquires a lock on the `lock', executes `body' and releases the lock.
241\end{adjustwidth}
242
243\paragraph{}
244\label{THREADS:YIELD}
245\index{YIELD}
246--- Function: \textbf{yield} [\textbf{threads}] \textit{}
247
248\begin{adjustwidth}{5em}{5em}
249A 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.
250
251See java.lang.Thread.yield().
252\end{adjustwidth}
253
Note: See TracBrowser for help on using the repository browser.