(define fc 5) (define sc 5) (define first_tid (thread-create (while (> fc 0) (do (thread-under-lock "ilock" (do (set! fc (dec fc))(print 1))) (thread-sleep 500))))) (define second_tid (thread-create (while (> sc 0) (do (thread-under-lock "ilock" (do (set! sc (dec sc))(print 2))) (thread-sleep 750))))) (print "first thread id:" first_tid) (print "second thread id:" second_tid) (threads-join) (print "ok") (try (ls-dir "nonexisting/dir") (print "dir not exists")) (try (throw "my-exception") (print "exception caught:" ml-exception)) (/ 1 0)