comparison tests/threads.ur @ 728:2197f0e24a9f

Avoid thread death via message receive
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Apr 2009 13:00:40 -0400
parents
children
comparison
equal deleted inserted replaced
727:ba4c230b7231 728:2197f0e24a9f
1 fun main () =
2 buf <- Buffer.create;
3 let
4 fun loop1 () =
5 Buffer.write buf "A";
6 sleep 9;
7 loop1 ()
8
9 fun loop2 () =
10 Buffer.write buf "B";
11 sleep 9;
12 error <xml>Darn</xml>
13 loop2 ()
14 in
15 return <xml><body onload={spawn (loop1 ()); loop2 ()}>
16 <dyn signal={Buffer.render buf}/>
17 </body></xml>
18 end