From: David Brown <caml-list@davidb.org>
To: Alessandro Baretta <alex@baretta.com>
Cc: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Question on Mutexes
Date: Tue, 18 Mar 2003 10:43:30 -0800 [thread overview]
Message-ID: <20030318184330.GA17623@opus.davidb.org> (raw)
In-Reply-To: <3E772105.2000307@baretta.com>
On Tue, Mar 18, 2003 at 02:37:09PM +0100, Alessandro Baretta wrote:
> If thread t1 locks mutex m, can thread t2 unlock it?
>
> I ask because I get no sign of exceptions being thrown when
> I execute the following code in the toplevel:
Most mutex implementations I've seen assume that the unlock is done by
the same thread. Posix threads allows you to enable error checking, to
check for this case. However, it does cause a performance hit.
Perhaps the mutex stuff could be wrapped in something that would check
for the error?
Dave
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2003-03-18 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-18 13:37 Alessandro Baretta
2003-03-18 18:43 ` David Brown [this message]
2003-03-20 15:13 ` Xavier Leroy
2003-03-24 11:19 ` Alessandro Baretta
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=20030318184330.GA17623@opus.davidb.org \
--to=caml-list@davidb.org \
--cc=alex@baretta.com \
--cc=caml-list@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