annotate tests/lessSafeFfi.ur @ 2033:ea0ecd5fa9df

Add locking to enforce atomicity of message sends from one transaction
author Adam Chlipala <adam@chlipala.net>
date Fri, 27 Jun 2014 14:39:31 -0400
parents 403f0cc65b9c
children ec2c7a22df0d
rev   line source
adam@2010 1 ffi foo : int -> int
adam@2010 2 ffi bar serverOnly benignEffectful : int -> transaction unit
adam@2010 3 ffi baz : transaction int
adam@2010 4
adam@2010 5 ffi bup jsFunc "jsbup" : int -> transaction unit
adam@2010 6
adam@2010 7 fun other () : transaction page =
adam@2010 8 (*bar 17;
adam@2010 9 q <- baz;*)
adam@2010 10 return <xml><body>
adam@2010 11 (*{[foo 42]}, {[q]}*)
adam@2010 12 <button onclick={fn _ => bup 32}/>
adam@2010 13 </body></xml>
adam@2010 14
adam@2010 15 fun main () = return <xml><body>
adam@2010 16 <form>
adam@2010 17 <submit action={other}/>
adam@2010 18 </form>
adam@2010 19 </body></xml>