[MLton-commit] r5570

Vesa Karvonen vesak at mlton.org
Sat May 26 08:09:34 PDT 2007


Renamed taker to tap, which I consider a better name for the concept.

----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/async/unstable/detail/async.sml
U   mltonlib/trunk/com/ssh/async/unstable/public/async.sig
U   mltonlib/trunk/com/ssh/async/unstable/test/async.sml

----------------------------------------------------------------------

Modified: mltonlib/trunk/com/ssh/async/unstable/detail/async.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/detail/async.sml	2007-05-23 14:04:14 UTC (rev 5569)
+++ mltonlib/trunk/com/ssh/async/unstable/detail/async.sml	2007-05-26 15:09:32 UTC (rev 5570)
@@ -151,7 +151,7 @@
       datatype 'a n = N of 'a * 'a n IVar.t
       datatype 'a t = T of 'a n IVar.t Ref.t
       fun new () = T (ref (IVar.new ()))
-      fun taker (T st) = let
+      fun tap (T st) = let
          val ch = Ch.new ()
          fun lp st =
              when (IVar.read st)

Modified: mltonlib/trunk/com/ssh/async/unstable/public/async.sig
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/public/async.sig	2007-05-23 14:04:14 UTC (rev 5569)
+++ mltonlib/trunk/com/ssh/async/unstable/public/async.sig	2007-05-26 15:09:32 UTC (rev 5570)
@@ -110,7 +110,8 @@
     * - Many can {read} a value without taking it.
     * - One can {send} a value to a handler without a rendezvous.
     * - Only the handler that {take}s a value sees it.
-    * - Multiple {taker}s may observe the same sequence of values.
+    * - Many can {tap} into a communication to observe the same sequence of
+    *   values.
     *)
 
    structure Ch : sig
@@ -151,7 +152,7 @@
    structure Multicast : sig
       type 'a t
       val new : 'a t Thunk.t
-      val taker : 'a t -> 'a Event.t
+      val tap : 'a t -> 'a Event.t
       val send : 'a t -> 'a Effect.t
    end
 end

Modified: mltonlib/trunk/com/ssh/async/unstable/test/async.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/test/async.sml	2007-05-23 14:04:14 UTC (rev 5569)
+++ mltonlib/trunk/com/ssh/async/unstable/test/async.sml	2007-05-26 15:09:32 UTC (rev 5570)
@@ -96,11 +96,11 @@
                    open Multicast
                    val c = new ()
                    val () = send c 1
-                   val t1 = taker c
+                   val t1 = tap c
                    val () = send c 2
-                   val t2 = taker c
+                   val t2 = tap c
                    val () = send c 3
-                   val t3 = taker c
+                   val t3 = tap c
                    val () = send c 4
                    val s1 = ref []
                    val s2 = ref []




More information about the MLton-commit mailing list