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

SCM Repository

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

Annotation of /sml/trunk/src/cml/doc/HTML/multicast.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download) (as text)

1 : monnier 2 <!-- multicast.html -->
2 :    
3 :     <!-- COPYRIGHT (c) 1997 AT\|@AMP\|T Research. -->
4 :    
5 :     <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
6 :     <HTML>
7 :     <HEAD>
8 :     <TITLE>The Multicast structure</TITLE>
9 :     </HEAD>
10 :     <BODY>
11 :     <H1><A NAME="top-of-document">The Concurrent ML Reference Manual</A></H1>
12 :     <HR>
13 :    
14 :     <H3>The <CODE>Multicast</CODE> structure</H3>
15 :     <P>
16 :     Multicast channels provide a mechanism for broadcasting a stream of messages to a collection of threads. Threads receive multicast messages via an <EM>output port</EM>; each port receives its own copy of every message sent since the port was created. Multicast channels are particularly useful for communicating with a dynamically varying group of threads, since the sender does not need to know how many threads are listening.
17 :     <HR>
18 :     <H4>Synopsis</H4>
19 :     <BLOCKQUOTE>
20 :     <CODE><B>signature </B><A NAME="MULTICAST:SIG:SPEC"><CODE>MULTICAST</CODE></A><BR>
21 :     <B>structure </B><A NAME="Multicast:STR:SPEC"><CODE>Multicast</CODE></A><B> : </B>MULTICAST<BR>
22 :     </CODE>
23 :     </BLOCKQUOTE>
24 :     <HR>
25 :     <H4>Interface</H4>
26 :     <BLOCKQUOTE>
27 :     <CODE><B>type</B> 'a <A NAME="SIG:MULTICAST.event:TY:SPEC" HREF="#SIG:MULTICAST.event:TY">event</A> <B>=</B> 'a CML.event <BR>
28 :     <B>type</B> 'a <A NAME="SIG:MULTICAST.mchan:TY:SPEC" HREF="#SIG:MULTICAST.mchan:TY">mchan</A><BR>
29 :     <B>type</B> 'a <A NAME="SIG:MULTICAST.port:TY:SPEC" HREF="#SIG:MULTICAST.port:TY">port</A><BR>
30 :     <B>val</B> <A NAME="SIG:MULTICAST.mChannel:VAL:SPEC" HREF="#SIG:MULTICAST.mChannel:VAL">mChannel</A> <B>:</B> unit -&gt; 'a mchan <BR>
31 :     <B>val</B> <A NAME="SIG:MULTICAST.port:VAL:SPEC" HREF="#SIG:MULTICAST.port:VAL">port</A> <B>:</B> 'a mchan -&gt; 'a port <BR>
32 :     <B>val</B> <A NAME="SIG:MULTICAST.copy:VAL:SPEC" HREF="#SIG:MULTICAST.copy:VAL">copy</A> <B>:</B> 'a port -&gt; 'a port <BR>
33 :     <B>val</B> <A NAME="SIG:MULTICAST.recv:VAL:SPEC" HREF="#SIG:MULTICAST.recv:VAL">recv</A> <B>:</B> 'a port -&gt; 'a <BR>
34 :     <B>val</B> <A NAME="SIG:MULTICAST.recvEvt:VAL:SPEC" HREF="#SIG:MULTICAST.recvEvt:VAL">recvEvt</A> <B>:</B> 'a port -&gt; 'a event <BR>
35 :     <B>val</B> <A NAME="SIG:MULTICAST.multicast:VAL:SPEC" HREF="#SIG:MULTICAST.multicast:VAL">multicast</A> <B>:</B> ('a mchan * 'a) -&gt; unit <BR>
36 :     </CODE>
37 :     </BLOCKQUOTE>
38 :     <H4>Description</H4>
39 :     <DL>
40 :     <DT> <A NAME="SIG:MULTICAST.event:TY"><CODE><B>type</B> 'a event</CODE></A>
41 :     <DD>
42 :     <BR>
43 :    
44 :     <DT> <A NAME="SIG:MULTICAST.mchan:TY"><CODE><B>type</B> 'a mchan</CODE></A>
45 :     <DD>
46 :     This is the type constructor for asynchronous multicast channels.
47 :     <BR>
48 :     <BR>
49 :    
50 :     <DT> <A NAME="SIG:MULTICAST.port:TY"><CODE><B>type</B> 'a port</CODE></A>
51 :     <DD>
52 :     This is the type constructor for output ports on an asynchronous multicast channels.
53 :     <BR>
54 :     <BR>
55 :    
56 :     <DT> <A NAME="SIG:MULTICAST.mChannel:VAL"><CODE>mChannel <VAR>()</VAR>
57 :     </CODE></A>
58 :     <DD>
59 :     creates a new multicast channel.
60 :     <BR>
61 :     <BR>
62 :    
63 :     <DT> <A NAME="SIG:MULTICAST.port:VAL"><CODE>port <VAR>mc</VAR>
64 :     </CODE></A>
65 :     <DD>
66 :     creates a new output port on the channel <VAR>mc</VAR>. The port receives those messages sent after it is created.
67 :     <BR>
68 :     <BR>
69 :    
70 :     <DT> <A NAME="SIG:MULTICAST.copy:VAL"><CODE>copy <VAR>p</VAR>
71 :     </CODE></A>
72 :     <DD>
73 :     creates a new output port on a channel that has the same state as the port <VAR>p</VAR>. I.e., the stream of messages seen on the two ports will be the same. This is useful when two threads need to see the same stream of messages. NOTE: if two (or more) independent threads are reading from <VAR>p</VAR> at the time that copy operation is performed, then it may not be accurate.
74 :     <BR>
75 :     <BR>
76 :    
77 :     <DT> <A NAME="SIG:MULTICAST.recv:VAL"><CODE>recv <VAR>p</VAR>
78 :     </CODE></A>
79 :     <DD>
80 :     gets the next message from the port <VAR>p</VAR>. The calling thread is blocked until there is a message available.
81 :     <BR>
82 :     <BR>
83 :    
84 :     <DT> <A NAME="SIG:MULTICAST.recvEvt:VAL"><CODE>recvEvt <VAR>p</VAR>
85 :     </CODE></A>
86 :     <DD>
87 :     creates an event value that represents the <A HREF="multicast.html#SIG:MULTICAST.recv:VAL:SPEC">recv</A> operation on the port <VAR>p</VAR>.
88 :     <BR>
89 :     <BR>
90 :    
91 :     <DT> <A NAME="SIG:MULTICAST.multicast:VAL"><CODE>multicast (<VAR>mc</VAR>, <VAR>v</VAR>)
92 :     </CODE></A>
93 :     <DD>
94 :     multicasts the value <VAR>v</VAR> on the channel <VAR>mc</VAR>. This is a nonblocking operation.
95 :     <BR>
96 :     <BR>
97 :    
98 :     </DL>
99 :     <HR>
100 :     <HR>
101 :     <B>[ <A HREF="index-all.html">INDEX</A> | <A HREF="multicast.html">TOP</A>
102 :     | <A HREF="cml-lib.html">Parent</A> | <A HREF="refman.html">Root</A>
103 :     ]</B>
104 :     <P>
105 :     <I>Last Modified January 29, 1997</I><BR>
106 :     Copyright &copy; 1996 AT&amp;T <BR>
107 :     <HR>
108 :     </BODY>
109 :     </HTML>

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