Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec loop1 () =
- Lwt_unix.sleep 1.0 >>= (fun () -> Log.info "foo") >>= (fun () -> loop1 ())
- in
- let rec loop2 () =
- Lwt_unix.sleep 2.0 >>= (fun () -> Log.info "bar") >>= (fun () -> loop2 ())
- in
- let threads = [
- loop1 (); loop2 (); fail_with "bah!"
- ] in
- Lwt_main.run @@ join threads
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement