Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Question on Mutexes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] Question on Mutexes
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