From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 13AF7BC37 for ; Wed, 27 Jan 2010 03:40:10 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswEAOI1X0tYvxGE/2dsb2JhbACBO5AYuQuGZohPgi+CCAQ X-IronPort-AV: E=Sophos;i="4.49,350,1262559600"; d="scan'208";a="50328960" Received: from www.rastageeks.org (HELO mail.rastageeks.org) ([88.191.17.132]) by mail1-smtp-roc.national.inria.fr with ESMTP; 27 Jan 2010 03:40:09 +0100 Received: from leonard.localnet (adsl-157-58-10.msy.bellsouth.net [66.157.58.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.rastageeks.org (Postfix) with ESMTPSA id 5AB8CBC5A1 for ; Wed, 27 Jan 2010 03:40:09 +0100 (CET) From: Romain Beauxis To: caml-list@yquem.inria.fr Subject: Problem with try_lock on win32. Date: Tue, 26 Jan 2010 20:45:48 -0600 User-Agent: KMail/1.12.4 (Linux/2.6.30-2-amd64; KDE/4.3.4; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201001262045.49994.romain.beauxis@gmail.com> X-Spam: no; 0.00; printf:01 printf:01 behaviour:01 mutex:03 mutex:03 let:03 let:03 outputs:04 problem:05 problem:05 missing:07 wrong:10 create:12 something:14 32.:15 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