Deadlocks could be created if the order in which locks are obtained is not
consistent.  Note, though, that the locks are obtained in the same order
each time throughout.  (BTW: The inner lock is merely needed because the
wait/notify calls need to own the monitor.)

Naturally, you are free to make any suggestions for improvement! :)

Scott

> -----Original Message-----
> From: Ilya Khandamirov [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 06, 2002 11:24 AM
> To: 'Lucene Users List'
> Subject: RE: IndexReader Pool
> 
> 
> >You are correct.  Actually, there have been a few bug fixes 
> since that
> was posted.
> >Here's a diff to an updated version:
> 
> Well, i do not see your actual version of this file, but it looks like
> now you have two "synchronized" blocks:
> 
> synchronized ( sync )
>   ...
> synchronized ( info )
> 
> This may produce deadlocks in a multithreading environment. Have you
> already solved this problem or i should take a closer look at it?
> 
> 
> >Hope it helps,
> 
> Sure. Thank you.
> 
> 
> >Scott
> 
> Regards,
> Ilya
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

Reply via email to