[e-lang] makeMultiChannel (was EProxyResolver and ...)

Mark S. Miller markm at cs.jhu.edu
Sun Mar 25 00:41:18 CDT 2007


Kevin Reid wrote:
> Here's the session, in which it behaves like I expected it to:
> 
> ? def makeMultiChannel := <import:makeMultiChannel>
> # value: <makeMultiChannel>
> 
> ? def [a, d] := makeMultiChannel()
> # value: [<Promise>, <distributor>]
> 
> ? def r1 := a <- run("1")
> # value: <Promise>
> [...]
> ? r1 <- __whenMoreResolved(println)
> # value: <Promise>
> response to 1
> 
> ? d.forward(fn x { println(`got again $x`); `response again to $x` })
> got again 1
> response again to 1
> 
> ? a <- ("two")
> # value: <Promise>
> got two
> got again two


I'd expect it to also print

     response again to two

Am I confused?


-- 
Text by me above is hereby placed in the public domain

     Cheers,
     --MarkM


More information about the e-lang mailing list