view tests/rpchan.ur @ 2269:f7bc7c11a656

Make SQL caches use more of the pure caching machinery, but it's brittle.
author Ziv Scully <ziv@mit.edu>
date Thu, 15 Oct 2015 00:52:04 -0400
parents 3dd041b00087
children
line wrap: on
line source
fun remote () =
    ch <- channel;
    send ch "Hello World!";
    return ch

fun remoter () =
    ch <- channel;
    send ch "Hello World!";
    return <xml><active code={spawn (s <- recv ch; alert s); return <xml/>}/></xml>

fun main () =
    x <- source <xml/>;
    return <xml><body>
      <button onclick={fn _ => ch <- rpc (remote ()); s <- recv ch; alert s}>TEST</button>
      <button onclick={fn _ => y <- rpc (remoter ()); set x y}>TESTER</button>
      <hr/>
      <dyn signal={signal x}/>
    </body></xml>