source: branches/streams/abcl/doc/manual/threads.tex

Last change on this file was 14766, checked in by Mark Evenson, 10 years ago

Re-grovel docstrings with improved code.

File size: 6.8 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 g1973515) 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 g1973775) 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}
230not-documented
231\end{adjustwidth}
232
233\paragraph{}
234\label{THREADS:WITH-THREAD-LOCK}
235\index{WITH-THREAD-LOCK}
236--- Macro: \textbf{with-thread-lock} [\textbf{threads}] \textit{}
237
238\begin{adjustwidth}{5em}{5em}
239not-documented
240\end{adjustwidth}
241
242\paragraph{}
243\label{THREADS:YIELD}
244\index{YIELD}
245--- Function: \textbf{yield} [\textbf{threads}] \textit{}
246
247\begin{adjustwidth}{5em}{5em}
248A 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.
249
250See java.lang.Thread.yield().
251\end{adjustwidth}
252
Note: See TracBrowser for help on using the repository browser.