Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Romain Beauxis <romain.beauxis@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Problem with try_lock on win32.
Date: Tue, 26 Jan 2010 20:45:48 -0600	[thread overview]
Message-ID: <201001262045.49994.romain.beauxis@gmail.com> (raw)

	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


             reply	other threads:[~2010-01-27  2:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27  2:45 Romain Beauxis [this message]
2010-01-27  8:23 ` [Caml-list] " David Allsopp
2010-01-27 14:54   ` Romain Beauxis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201001262045.49994.romain.beauxis@gmail.com \
    --to=romain.beauxis@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox