diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-07-25 08:20:15 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-07-25 08:20:15 -0400 |
commit | 59fbe515a0462e98ab3cbb78a1f136f382ab927a (patch) | |
tree | 5bad8880a0a764f7d77e14b382ddb07ec268fb18 /tests | |
parent | 6f9747dbea34c09ae40f9859f63ad77abc1bd950 (diff) |
Change 'spawn' implementation to allow blocking within <active code>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/activeBlock.ur | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/activeBlock.ur b/tests/activeBlock.ur new file mode 100644 index 00000000..5560edda --- /dev/null +++ b/tests/activeBlock.ur @@ -0,0 +1,10 @@ +fun main () : transaction page = return <xml><body> + <active code={s <- source ""; return <xml> + <dyn signal={s <- signal s; return (txt s)}/> + <button onclick={fn _ => set s "Hi!"}/> + </xml>}/> + + <active code={sleep 1; return <xml>Hi!</xml>}/> + + <active code={spawn (sleep 1; alert "Hi!"); return <xml>Success</xml>}/> +</body></xml> |