Mercurial > urweb
annotate tests/lessSafeFfi.ur @ 2166:8a01e8f21de9
Make OpenSSL usage thread-safe (closes #206)
Enable OpenSSL?s multithreading support by defining locking and
thread-ID callbacks. Remove a lock obviated by this change.
author | Benjamin Barenblat <bbaren@mit.edu> |
---|---|
date | Thu, 06 Aug 2015 10:15:53 -0400 |
parents | 3d10ae22abd6 |
children |
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@2038 | 4 ffi adder : int -> int -> int |
adam@2010 | 5 |
adam@2038 | 6 ffi bup jsFunc "alert" : string -> transaction unit |
adam@2039 | 7 ffi alert : string -> transaction unit |
adam@2010 | 8 |
adam@2010 | 9 fun other () : transaction page = |
adam@2010 | 10 (*bar 17; |
adam@2010 | 11 q <- baz;*) |
adam@2010 | 12 return <xml><body> |
adam@2010 | 13 (*{[foo 42]}, {[q]}*) |
adam@2039 | 14 <button value="bup" onclick={fn _ => bup "asdf"}/> |
adam@2039 | 15 <button value="alert" onclick={fn _ => alert "qqqz"}/> |
adam@2010 | 16 </body></xml> |
adam@2010 | 17 |
adam@2010 | 18 fun main () = return <xml><body> |
adam@2010 | 19 <form> |
adam@2010 | 20 <submit action={other}/> |
adam@2010 | 21 </form> |
adam@2010 | 22 </body></xml> |