Re: [Caml-list] Problem with try_lock on win32.

2010-01-27 Thread Romain Beauxis
Hi ! Le mercredi 27 janvier 2010 02:23:25, David Allsopp a écrit : > Romain Beauxis: > > I have a problem with the following code under win32: > > > > let m = Mutex.create () > > > > let () = > > Mutex.lock m; > > if Mutex.try_lock m then > > Printf.printf "locked !\n" > > else

RE: [Caml-list] Problem with try_lock on win32.

2010-01-27 Thread David Allsopp
Romain Beauxis: > I have a problem with the following code under win32: > > let m = Mutex.create () > > let () = > Mutex.lock m; > if Mutex.try_lock m then > Printf.printf "locked !\n" > else > Printf.printf "could not lock!\n" This code is behaving correctly for a Windows mutex (A

[Caml-list] Problem with try_lock on win32.

2010-01-26 Thread Romain Beauxis
Hi all ! I have a problem with the following code under win32: let m = Mutex.create () let () = Mutex.lock m; if Mutex.try_lock m then Printf.printf "locked !\n" else Printf.printf "could not lock!\n" When run, the program outputs: "locked !" Obviously, this is not the i