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/ML-Doc/sync-var.mldoc
ViewVC logotype

Diff of /sml/trunk/src/cml/doc/ML-Doc/sync-var.mldoc

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 41  Line 41 
41          I-structured variables are write-once variables that provide          I-structured variables are write-once variables that provide
42          synchronization on read operations.          synchronization on read operations.
43          They are especially useful for one-shot communications, such          They are especially useful for one-shot communications, such
44          as reply messages in client/server protocols.          as reply messages in client/server protocols, and can also be used
45            to implement shared <EM>incremental</EM> data structures.
46      <SPEC>      <SPEC>
47        <VAL>iVar<TY>unit -> 'a ivar        <VAL>iVar<TY>unit -> 'a ivar
48          <COMMENT>          <COMMENT>
# Line 92  Line 93 
93            <PROTOTY>            <PROTOTY>
94            sameIVar (<ARG/iv1/, <ARG/iv2/)            sameIVar (<ARG/iv1/, <ARG/iv2/)
95            </PROTOTY>            </PROTOTY>
96            returns <CD/true/, if the <ARG/iv1/ and <ARG/iv2/ are the            returns <CD/true/, if <ARG/iv1/ and <ARG/iv2/ are the
97            same I-variable.            same I-variable.
98      <SPEC>      <SPEC>
99        <TYPE><TYPARAM>'a<ID>mvar        <TYPE><TYPARAM>'a<ID>mvar
# Line 114  Line 115 
115        <VAL>mVarInit<TY>'a -> 'a mvar        <VAL>mVarInit<TY>'a -> 'a mvar
116          <COMMENT>          <COMMENT>
117            <PROTOTY>            <PROTOTY>
118            mVar x            mVarInit <ARG/x/
119            </PROTOTY>            </PROTOTY>
120            creates a new M-variable initialized to <ARG/x/.            creates a new M-variable initialized to <ARG/x/.
121      <SPEC>      <SPEC>
# Line 197  Line 198 
198        <VAL>mSwapEvt<TY>('a mvar * 'a) -> 'a event        <VAL>mSwapEvt<TY>('a mvar * 'a) -> 'a event
199          <COMMENT>          <COMMENT>
200            <PROTOTY>            <PROTOTY>
201            mSwapEvt <ARG/mv/            mSwapEvt (<ARG/mv/, <ARG/newV/)
202            </PROTOTY>            </PROTOTY>
203            returns an event-value that represents the <VALREF/mSwap/            returns an event-value that represents the <VALREF/mSwap/
204            operation on <ARG/mv/ and <ARG/newV/.            operation on <ARG/mv/ and <ARG/newV/.
# Line 213  Line 214 
214  </STRUCTURE>  </STRUCTURE>
215  <PP>  <PP>
216  I-variables provide a useful mechanism for implementing the  I-variables provide a useful mechanism for implementing the
217  reply communication in request/reply protocols.  reply communication in request/reply protocols (in cases where
218    the server does not care if the reply is accepted).
219  They may also be used to implement incremental data structures  They may also be used to implement incremental data structures
220  and streams.  and streams; for example, the <STRREF>Multicast</STRREF> structure
221    uses I-variables to implement its multicast channels.
222  <PP>  <PP>
223  A disciplined use of M-variables can provide an atomic  A disciplined use of M-variables can provide an atomic
224  read-modify-write operation.  read-modify-write operation.

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