[concurrency-interest] difference latch and lock

Peter Veentjer alarmnummer at gmail.com
Wed Aug 30 17:26:03 EDT 2006


I don't know what a latch is supposed to do. I see the term in
documentation (especially in concurrency control documentation of
Oracle). And I think a Latch can be compared to a Lock, but I don't
know for sure and I can't find any usefull documentation about what a
Latch is supposed to do.

So I want to know what it does.

On 8/30/06, David Holmes <dcholmes at optusnet.com.au> wrote:
> Peter,
>
> Depends exactly what you mean by "latch". A latch or gate is a
> synchronization barrier that is either open or closed. If open anyone can
> pass, if closed no one can pass. A Lock is intended to let through one
> thread at a time.
>
> I don't know what they meant by a latch being more lightweight than a lock
> ???
>
> David Holmes
>
> > -----Original Message-----
> > From: concurrency-interest-bounces at cs.oswego.edu
> > [mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Peter
> > Veentjer
> > Sent: Thursday, 31 August 2006 6:14 AM
> > To: concurrency-interest at cs.oswego.edu
> > Subject: [concurrency-interest] difference latch and lock
> >
> >
> > Who can tell me what the difference between a Latch and a Lock is. I
> > have read multiple times that a Latch is considered a more lightweight
> > lock than the lock (maybe only in the context of databases and heavy
> > weight locks).
> >
> > But in Java all Locks and synchronized blocks are lightweight.. so are
> > there differences?
> > _______________________________________________
> > Concurrency-interest mailing list
> > Concurrency-interest at altair.cs.oswego.edu
> > http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>


More information about the Concurrency-interest mailing list