/usr/share/mozart/doc/base/thread.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>10.5 Threads</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="exception.html#section.control.exceptions"><< Prev</A></TD><TD><A href="node12.html">- Up -</A></TD></TR></TABLE><DIV id="section.control.threads"><H2><A name="section.control.threads">10.5 Threads</A></H2><P> The module <CODE>Thread</CODE> provides operations on first class threads. </P><P> Threads may be in one of three states, namely <EM>runnable</EM>, <EM>blocked</EM>, or <EM>terminated</EM>. Orthogonally, a thread may be <EM>suspended</EM>. </P><P> Runnable and non-suspended threads are scheduled according to their priorities, which may be <CODE>low</CODE>, <CODE>medium</CODE>, or <CODE>high</CODE>. The default priority is <CODE>medium</CODE>. The priority of a thread may influence its time share for execution, where threads with <CODE>medium</CODE> priority obtain at least as long a time share as threads with <CODE>low</CODE> priority and at most as long as threads with <CODE>high</CODE> priority. Implementations may also choose not to schedule a thread at all if a thread with higher priority is runnable. </P><P> A newly created thread inherits its priority from its parent if the latter has either <CODE>medium</CODE> or <CODE>low</CODE> priority. Otherwise, the new thread gets default (i. e., <CODE>medium</CODE>) priority. </P><DL><DT><A name="label735"></A><SPAN class="index"><CODE>IsThread</CODE></SPAN> <A name="label736"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>is </CODE><CODE>+<I>X</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>test whether <CODE><I>X</I></CODE> is a thread. </P></DD><DT><CODE>this</CODE> <A name="label738"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>this </CODE><CODE>?<I>Thread</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns the current thread. </P></DD><DT><CODE>state</CODE> <A name="label740"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>state </CODE><CODE>+<I>Thread</I></CODE><CODE> </CODE><CODE>?<I>A</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns one of the atoms <CODE>runnable</CODE>, <CODE>blocked</CODE>, <CODE>terminated</CODE> according to the current state of <CODE><I>Thread</I></CODE>. </P></DD><DT><CODE>resume</CODE> <A name="label742"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>resume </CODE><CODE>+<I>Thread</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>resumes <CODE><I>Thread</I></CODE>. Resumption undoes suspension. </P></DD><DT><CODE>suspend</CODE> <A name="label744"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>suspend </CODE><CODE>+<I>Thread</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>suspends <CODE><I>Thread</I></CODE> such that it cannot be further reduced. </P></DD><DT><CODE>isSuspended</CODE> <A name="label746"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>isSuspended </CODE><CODE>+<I>Thread</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>Thread</I></CODE> is currently suspended. </P></DD><DT><CODE>injectException</CODE> <A name="label748"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>injectException </CODE><CODE>+<I>Thread</I></CODE><CODE> </CODE><CODE>+<I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>raises <CODE><I>X</I></CODE> as exception on <CODE><I>Thread</I></CODE>. If <CODE><I>Thread</I></CODE> is terminated, an error exception is raised in the current thread. </P></DD><DT><CODE>terminate</CODE> <A name="label750"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>terminate </CODE><CODE>+<I>Thread</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>raises an exception <CODE>kernel(terminate <SPAN class="keyword">...</SPAN>)</CODE> on <CODE><I>Thread</I></CODE>. </P></DD><DT><CODE>getPriority</CODE> <A name="label752"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>getPriority </CODE><CODE>+<I>Thread</I></CODE><CODE> </CODE><CODE>?<I>A</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns one of them atoms <CODE>low</CODE>, <CODE>medium</CODE>, or <CODE>high</CODE> according to the current priority of <CODE><I>Thread</I></CODE>. </P></DD><DT><CODE>setPriority</CODE> <A name="label754"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>setPriority </CODE><CODE>+<I>Thread</I></CODE><CODE> </CODE><CODE>+<I>A</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>sets priority of thread <CODE><I>Thread</I></CODE> to the priority described by atom <CODE><I>A</I></CODE>. <CODE><I>A</I></CODE> must be one of <CODE>low</CODE>, <CODE>medium</CODE>, or <CODE>high</CODE>. </P></DD><DT><CODE>getThisPriority</CODE> <A name="label756"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>getThisPriority </CODE><CODE>?<I>A</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns one of them atoms <CODE>low</CODE>, <CODE>medium</CODE>, or <CODE>high</CODE> according to the priority of the current thread. </P></DD><DT><CODE>setThisPriority</CODE> <A name="label758"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>setThisPriority </CODE><CODE>+<I>A</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>sets priority of the current thread to the priority described by atom <CODE><I>A</I></CODE>. <CODE><I>A</I></CODE> must be one of <CODE>low</CODE>, <CODE>medium</CODE>, or <CODE>high</CODE>. </P></DD><DT><CODE>preempt</CODE> <A name="label760"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Thread<SPAN class="keyword">.</SPAN>preempt </CODE><CODE>+<I>Thread</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>preempts the current thread, i. e., immediately schedules another runnable thread (if there is one). <CODE><I>Thread</I></CODE> stays runnable. </P></DD></DL><P></P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="exception.html#section.control.exceptions"><< Prev</A></TD><TD><A href="node12.html">- Up -</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif Kornstaedt</A> and <A href="http://www.ps.uni-sb.de/~schulte/">Christian Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|