mutex0.ml
stdune
1 2 3 4 5 6 7 8 9 10 11 12 13 14 open Mutex let[@warning "-32"] [@inline never] protect mutex f = lock mutex; match f () with | x -> unlock mutex; x | exception exn -> unlock mutex; raise exn ;; include Mutex
1 2 3 4 5 6 7 8 9 10 11 12 13 14
open Mutex let[@warning "-32"] [@inline never] protect mutex f = lock mutex; match f () with | x -> unlock mutex; x | exception exn -> unlock mutex; raise exn ;; include Mutex