Version française
Home     About     Download     Resources     Contact us    
Browse thread
Problem with try_lock on win32.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Romain Beauxis <romain.beauxis@g...>
Subject: Problem with try_lock on win32.
	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 intented behaviour..

Do you know what is wrong ? Is there something I am missing ??


Romain