Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2003-03-18 (18:43)
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?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: