Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/cml/doc/HTML/cml.html
ViewVC logotype

Diff of /sml/trunk/src/cml/doc/HTML/cml.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 843, Tue Jun 19 21:53:04 2001 UTC revision 844, Wed Jun 20 20:39:15 2001 UTC
# Line 120  Line 120 
120  <DT> <A NAME="SIG:CML.sameTid:VAL"><CODE>sameTid (<VAR>tid1</VAR>, <VAR>tid2</VAR>)  <DT> <A NAME="SIG:CML.sameTid:VAL"><CODE>sameTid (<VAR>tid1</VAR>, <VAR>tid2</VAR>)
121            </CODE></A>            </CODE></A>
122  <DD>  <DD>
123  returns true, if the two thread IDs are the same ID.  returns <CODE>true</CODE>, if the two thread IDs are the same ID.
124  <BR>  <BR>
125  <BR>  <BR>
126    
# Line 148  Line 148 
148  <DT> <A NAME="SIG:CML.joinEvt:VAL"><CODE>joinEvt <VAR>tid</VAR>  <DT> <A NAME="SIG:CML.joinEvt:VAL"><CODE>joinEvt <VAR>tid</VAR>
149            </CODE></A>            </CODE></A>
150  <DD>  <DD>
151  creates an event value for synchronizing on the termination of    the thread with the ID <VAR>tid</VAR>.          There are three ways that a thread may terminate: the function that     was passed to <A HREF="cml.html#SIG:CML.spawn:VAL:SPEC">spawn</A> may return; it may call the <A HREF="cml.html#SIG:CML.exit:VAL:SPEC">exit</A>         function, or it may have an uncaught exception.         Note that joinEvt does not distinguish between these    cases; it also does not become enabled if the named thread deadlocks    (even if it is garbage collected).  creates an event value for synchronizing on the termination of    the thread with the ID <VAR>tid</VAR>.          There are three ways that a thread may terminate: the function that     was passed to <A HREF="cml.html#SIG:CML.spawn:VAL:SPEC">spawn</A> (or <A HREF="cml.html#SIG:CML.spawnc:VAL:SPEC">spawnc</A>) may return; it     may call the <A HREF="cml.html#SIG:CML.exit:VAL:SPEC">exit</A> function, or it may have an uncaught     exception.      Note that joinEvt does not distinguish between these    cases; it also does not become enabled if the named thread deadlocks    (even if it is garbage collected).
152  <BR>  <BR>
153  <BR>  <BR>
154    
# Line 162  Line 162 
162  <DT> <A NAME="SIG:CML.sameChannel:VAL"><CODE>sameChannel (<VAR>ch1</VAR>, <VAR>ch2</VAR>)  <DT> <A NAME="SIG:CML.sameChannel:VAL"><CODE>sameChannel (<VAR>ch1</VAR>, <VAR>ch2</VAR>)
163            </CODE></A>            </CODE></A>
164  <DD>  <DD>
165  returns true, if the two channels are the same channel.  returns <CODE>true</CODE>, if the two channels are the same channel.
166  <BR>  <BR>
167  <BR>  <BR>
168    
169  <DT> <A NAME="SIG:CML.send:VAL"><CODE>send (<VAR>ch</VAR>, <VAR>a</VAR>)  <DT> <A NAME="SIG:CML.send:VAL"><CODE>send (<VAR>ch</VAR>, <VAR>msg</VAR>)
170            </CODE></A>            </CODE></A>
171  <DD>  <DD>
172  sends the message <VAR>a</VAR> on the synchronous channel <VAR>ch</VAR>.          This operation blocks the calling thread until there is another         thread attempting a <A HREF="cml.html#SIG:CML.recv:VAL:SPEC">recv</A> operation on the channel <VAR>ch</VAR>.  sends the message <VAR>msg</VAR> on the synchronous channel <VAR>ch</VAR>.        This operation blocks the calling thread until there is another         thread attempting to receive a message from the channel <VAR>ch</VAR>,          at which point the receiving thread gets the message and both threads           continue execution.
173  <BR>  <BR>
174  <BR>  <BR>
175    
176  <DT> <A NAME="SIG:CML.recv:VAL"><CODE>recv <VAR>ch</VAR>  <DT> <A NAME="SIG:CML.recv:VAL"><CODE>recv <VAR>ch</VAR>
177            </CODE></A>            </CODE></A>
178  <DD>  <DD>
179  receives a message from the channel <VAR>ch</VAR>.        This operation blocks the calling thread until there is another         thread attempting a <A HREF="cml.html#SIG:CML.send:VAL:SPEC">send</A> operation on the channel <VAR>ch</VAR>.  receives a message from the channel <VAR>ch</VAR>.        This operation blocks the calling thread until there is another         thread attempting to send a message on the channel <VAR>ch</VAR>,       at which point both threads continue execution.
180  <BR>  <BR>
181  <BR>  <BR>
182    
# Line 187  Line 187 
187  <BR>  <BR>
188  <BR>  <BR>
189    
190  <DT> <A NAME="SIG:CML.sendPoll:VAL"><CODE>send (<VAR>ch</VAR>, <VAR>a</VAR>)  <DT> <A NAME="SIG:CML.sendPoll:VAL"><CODE>sendPoll (<VAR>ch</VAR>, <VAR>msg</VAR>)
191            </CODE></A>            </CODE></A>
192  <DD>  <DD>
193  attempts to send the message <VAR>a</VAR> on the synchronous channel <VAR>ch</VAR>.       If this operation can complete without blocking the calling thread, then        the message is sent and <CODE>true</CODE> is returned.          Otherwise, no communication is preformed and <CODE>false</CODE> is returned.    This function is not recommended for general use; it is provided        as an efficiency aid for certain kinds of protocols.  attempts to send the message <VAR>msg</VAR> on the synchronous channel <VAR>ch</VAR>.     If this operation can complete without blocking the calling thread, then        the message is sent and <CODE>true</CODE> is returned.          Otherwise, no communication is preformed and <CODE>false</CODE> is returned.    This function is not recommended for general use; it is provided        as an efficiency aid for certain kinds of protocols.
194  <BR>  <BR>
195  <BR>  <BR>
196    
# Line 208  Line 208 
208  <BR>  <BR>
209  <BR>  <BR>
210    
211  <DT> <A NAME="SIG:CML.wrapHandler:VAL"><CODE>wrapHandler (<VAR>ev</VAR>, <VAR>f</VAR>)  <DT> <A NAME="SIG:CML.wrapHandler:VAL"><CODE>wrapHandler (<VAR>ev</VAR>, <VAR>h</VAR>)
212            </CODE></A>            </CODE></A>
213  <DD>  <DD>
214  wraps the exception handler function <VAR>f</VAR> around the event        value <VAR>ev</VAR>.    If, during execution of some post-synchronization action in     <VAR>ev</VAR>, an exception is raised, it will be caught and passed     to <VAR>f</VAR>.        Nesting of handlers works as would be expected: the innermost           handler is the one invoked.     Note that exceptions raised in the pre-synchronization actions in       <VAR>ev</VAR> (i.e., actions defined by <A HREF="cml.html#SIG:CML.guard:VAL:SPEC">guard</A> and <A HREF="cml.html#SIG:CML.withNack:VAL:SPEC">withNack</A>)      are not handled by <VAR>f</VAR>.  wraps the exception handler function <VAR>h</VAR> around the event        value <VAR>ev</VAR>.    If, during execution of some post-synchronization action in     <VAR>ev</VAR>, an exception is raised, it will be caught and passed     to <VAR>h</VAR>.        Nesting of handlers works as would be expected: the innermost           handler is the first one invoked.       Note that exceptions raised in the pre-synchronization actions in       <VAR>ev</VAR> (i.e., actions defined by <A HREF="cml.html#SIG:CML.guard:VAL:SPEC">guard</A> and <A HREF="cml.html#SIG:CML.withNack:VAL:SPEC">withNack</A>)      are not handled by <VAR>h</VAR>.
215  <BR>  <BR>
216  <BR>  <BR>
217    
218  <DT> <A NAME="SIG:CML.guard:VAL"><CODE>guard <VAR>f</VAR>  <DT> <A NAME="SIG:CML.guard:VAL"><CODE>guard <VAR>g</VAR>
219            </CODE></A>            </CODE></A>
220  <DD>  <DD>
221  creates <I>delayed</I> event value from the function <VAR>f</VAR>.        When the resulting event value is synchronized on, the function         <VAR>f</VAR> will be evaluated and the resulting event value will be    used in its place in the synchronization.       This provides a mechanism for implementing pre-synchronization          actions, such as sending a request to a server.  creates a <I>delayed</I> event value from the function <VAR>g</VAR>.      When the resulting event value is synchronized on, the function         <VAR>g</VAR> will be evaluated and the resulting event value will be    used in its place in the synchronization.       This provides a mechanism for implementing pre-synchronization          actions, such as sending a request to a server.
222  <BR>  <BR>
223  <BR>  <BR>
224    
225  <DT> <A NAME="SIG:CML.withNack:VAL"><CODE>withNack <VAR>f</VAR>  <DT> <A NAME="SIG:CML.withNack:VAL"><CODE>withNack <VAR>g</VAR>
226            </CODE></A>            </CODE></A>
227  <DD>  <DD>
228  creates <I>delayed</I> event value from the function <VAR>f</VAR>.        As in the case of <A HREF="cml.html#SIG:CML.guard:VAL:SPEC">guard</A>, the function <VAR>f</VAR> will be evaluated      at synchronization time and the resulting event value will be           used in its place in the synchronization.       Furthermore, when <VAR>f</VAR> is evaluated, it is passed a <I>negative         acknowledgement</I> event as an argument.       If the event value that is returned from the evaluation of <VAR>f</VAR>         is <EM>not</EM> chosen in the synchronization, then the negative        event will be enabled.          This provides a mechanism for informing servers that a client has       aborted a transaction.  creates a <I>delayed</I> event value from the function <VAR>g</VAR>.      As in the case of <A HREF="cml.html#SIG:CML.guard:VAL:SPEC">guard</A>, the function <VAR>g</VAR> will be evaluated      at synchronization time and the resulting event value will be           used in its place in the synchronization.       Furthermore, when <VAR>g</VAR> is evaluated, it is passed a <I>negative         acknowledgement</I> event as an argument.       This negative acknowledgement event is enabled in the case where        some other event involved in the synchronization is chosen instead      of the one produced by <VAR>g</VAR>.    The withNack combinator provides a mechanism for        informing servers that a client has aborted a transaction.
229  <BR>  <BR>
230  <BR>  <BR>
231    
232  <DT> <A NAME="SIG:CML.choose:VAL"><CODE>choose <VAR>l</VAR>  <DT> <A NAME="SIG:CML.choose:VAL"><CODE>choose <VAR>evs</VAR>
233            </CODE></A>            </CODE></A>
234  <DD>  <DD>
235  constructs an event value that represents the non-deterministic           choice of the events in the list <VAR>l</VAR>.  constructs an event value that represents the non-deterministic           choice of the events in the list <VAR>evs</VAR>.
236  <BR>  <BR>
237  <BR>  <BR>
238    
# Line 246  Line 246 
246  <DT> <A NAME="SIG:CML.select:VAL"><CODE>select <VAR>evs</VAR>  <DT> <A NAME="SIG:CML.select:VAL"><CODE>select <VAR>evs</VAR>
247            </CODE></A>            </CODE></A>
248  <DD>  <DD>
249  synchronizes on the choice of a list of event values.     This is semantically equivalant to:  synchronizes on the non-deterministic choice of the events in the         list <VAR>evs</VAR>.    It is semantically equivalant to:
250  <PRE>  <PRE>
251              <A HREF="cml.html#SIG:CML.sync:VAL:SPEC">sync</A> (<A HREF="cml.html#SIG:CML.choose:VAL:SPEC">choose</A> <VAR>evs</VAR>)              <A HREF="cml.html#SIG:CML.sync:VAL:SPEC">sync</A> (<A HREF="cml.html#SIG:CML.choose:VAL:SPEC">choose</A> <VAR>evs</VAR>)
252    
# Line 267  Line 267 
267  <BR>  <BR>
268  <BR>  <BR>
269    
270  <DT> <A NAME="SIG:CML.alwaysEvt:VAL"><CODE>alwaysEvt <VAR>a</VAR>  <DT> <A NAME="SIG:CML.alwaysEvt:VAL"><CODE>alwaysEvt <VAR>x</VAR>
271            </CODE></A>            </CODE></A>
272  <DD>  <DD>
273  creates an event value that is always enabled, and that returns           the value <VAR>a</VAR> upon synchronization.  creates an event value that is always enabled, and that returns           the value <VAR>x</VAR> upon synchronization.
274  <BR>  <BR>
275  <BR>  <BR>
276    

Legend:
Removed from v.843  
changed lines
  Added in v.844

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0