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] Resource acquisition is initialization
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] Resource acquisition is initialization

Brian Hurt wrote:
> On Wed, 11 Dec 2002, Blair Zajac wrote:

> The only thing I can think of which cannot tolerate the cleanup slop is 
> releasing a mutex.  Deleting the mutex itself is a good application for 
> GC, unlocking the mutex is not.

It is not the GC which unlocks the mutex but the application 
code. See Mutex.unlock .

> And for that, I think representing 
> holding the lock as the lifetime of an object to be a bad idea.  Were Caml 
> interested more in doing multithreaded code, I'd recommend something like 
> Java's synchronize keyword.

What's the difference with respect to locking a Mutex?


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