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/branches/SMLNJ/src/cml/doc/HTML/multicast.html
ViewVC logotype

Annotation of /sml/branches/SMLNJ/src/cml/doc/HTML/multicast.html

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : monnier 8 <!-- HTML/multicast.html -->
2 : monnier 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 : monnier 8 <A NAME="top"></A>
12 :     <H1 align=CENTER>The Concurrent ML Reference Manual</H1>
13 : monnier 2 <HR>
14 :    
15 : monnier 8
16 : monnier 2 <H3>The <CODE>Multicast</CODE> structure</H3>
17 :     <P>
18 :     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.
19 :     <HR>
20 :     <H4>Synopsis</H4>
21 :     <BLOCKQUOTE>
22 :     <CODE><B>signature </B><A NAME="MULTICAST:SIG:SPEC"><CODE>MULTICAST</CODE></A><BR>
23 :     <B>structure </B><A NAME="Multicast:STR:SPEC"><CODE>Multicast</CODE></A><B> : </B>MULTICAST<BR>
24 :     </CODE>
25 :     </BLOCKQUOTE>
26 :     <HR>
27 :     <H4>Interface</H4>
28 :     <BLOCKQUOTE>
29 :     <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>
30 :     <B>type</B> 'a <A NAME="SIG:MULTICAST.mchan:TY:SPEC" HREF="#SIG:MULTICAST.mchan:TY">mchan</A><BR>
31 :     <B>type</B> 'a <A NAME="SIG:MULTICAST.port:TY:SPEC" HREF="#SIG:MULTICAST.port:TY">port</A><BR>
32 :     <B>val</B> <A NAME="SIG:MULTICAST.mChannel:VAL:SPEC" HREF="#SIG:MULTICAST.mChannel:VAL">mChannel</A> <B>:</B> unit -&gt; 'a mchan <BR>
33 :     <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>
34 :     <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>
35 :     <B>val</B> <A NAME="SIG:MULTICAST.recv:VAL:SPEC" HREF="#SIG:MULTICAST.recv:VAL">recv</A> <B>:</B> 'a port -&gt; 'a <BR>
36 :     <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>
37 :     <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>
38 :     </CODE>
39 :     </BLOCKQUOTE>
40 :     <H4>Description</H4>
41 :     <DL>
42 :     <DT> <A NAME="SIG:MULTICAST.event:TY"><CODE><B>type</B> 'a event</CODE></A>
43 :     <DD>
44 :     <BR>
45 :    
46 :     <DT> <A NAME="SIG:MULTICAST.mchan:TY"><CODE><B>type</B> 'a mchan</CODE></A>
47 :     <DD>
48 :     This is the type constructor for asynchronous multicast channels.
49 :     <BR>
50 :     <BR>
51 :    
52 :     <DT> <A NAME="SIG:MULTICAST.port:TY"><CODE><B>type</B> 'a port</CODE></A>
53 :     <DD>
54 :     This is the type constructor for output ports on an asynchronous multicast channels.
55 :     <BR>
56 :     <BR>
57 :    
58 :     <DT> <A NAME="SIG:MULTICAST.mChannel:VAL"><CODE>mChannel <VAR>()</VAR>
59 :     </CODE></A>
60 :     <DD>
61 :     creates a new multicast channel.
62 :     <BR>
63 :     <BR>
64 :    
65 :     <DT> <A NAME="SIG:MULTICAST.port:VAL"><CODE>port <VAR>mc</VAR>
66 :     </CODE></A>
67 :     <DD>
68 :     creates a new output port on the channel <VAR>mc</VAR>. The port receives those messages sent after it is created.
69 :     <BR>
70 :     <BR>
71 :    
72 :     <DT> <A NAME="SIG:MULTICAST.copy:VAL"><CODE>copy <VAR>p</VAR>
73 :     </CODE></A>
74 :     <DD>
75 :     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.
76 :     <BR>
77 :     <BR>
78 :    
79 :     <DT> <A NAME="SIG:MULTICAST.recv:VAL"><CODE>recv <VAR>p</VAR>
80 :     </CODE></A>
81 :     <DD>
82 :     gets the next message from the port <VAR>p</VAR>. The calling thread is blocked until there is a message available.
83 :     <BR>
84 :     <BR>
85 :    
86 :     <DT> <A NAME="SIG:MULTICAST.recvEvt:VAL"><CODE>recvEvt <VAR>p</VAR>
87 :     </CODE></A>
88 :     <DD>
89 :     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>.
90 :     <BR>
91 :     <BR>
92 :    
93 :     <DT> <A NAME="SIG:MULTICAST.multicast:VAL"><CODE>multicast (<VAR>mc</VAR>, <VAR>v</VAR>)
94 :     </CODE></A>
95 :     <DD>
96 :     multicasts the value <VAR>v</VAR> on the channel <VAR>mc</VAR>. This is a nonblocking operation.
97 :     <BR>
98 :     <BR>
99 :    
100 :     </DL>
101 :     <HR>
102 : monnier 8
103 :    
104 : monnier 2 <HR>
105 : monnier 8 <CENTER>
106 :     <B>[ <A HREF="index-all.html">INDEX</A> | <A HREF="#top">TOP</A>
107 : monnier 2 | <A HREF="cml-lib.html">Parent</A> | <A HREF="refman.html">Root</A>
108 :     ]</B>
109 : monnier 8 </CENTER>
110 : monnier 2 <P>
111 :     <I>Last Modified January 29, 1997</I><BR>
112 : monnier 8 <I>Comments to <A HREF="mailto:jhr@research.bell-labs.com">John Reppy.</A></I><BR>
113 :    
114 :     Copyright &copy; 1997 Bell Labs, Lucent Technologies <BR>
115 :    
116 : monnier 2 <HR>
117 :     </BODY>
118 :     </HTML>

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