Hello,
In my effort to eliminate resource leackage in ContentAggregator,
I found that Excalibur's DefaultPool is deadlock-prone.
Deadlock situation occur when component which is being returned
to pool is also want to return component of the same type
(effectively, to the same pool).
I do not have Avalon CVS on hand, so here is description of the change
instead of a patch.
To fix the problem, part of the put() method which now read:
------------------------------------------------------------
try
{
super.m_mutex.lock();
if(obj instanceof Recyclable)
((Recyclable)obj).recycle();
super.m_active.remove(super.m_active.indexOf(obj));
getLogger().debug("Returning a " +
super.m_factory.getCreatedClass().getName() + " to the pool");
------------------------------------------------------------
Should be:
------------------------------------------------------------
try
{
if(obj instanceof Recyclable)
((Recyclable)obj).recycle();
super.m_mutex.lock();
super.m_active.remove(super.m_active.indexOf(obj));
getLogger().debug("Returning a " +
super.m_factory.getCreatedClass().getName() + " to the pool");
------------------------------------------------------------
I think that Berin or any other active Avalon developer should be able
to fix this.
PS: This should go actually to Avalon list, but I'm not subscribed...
Thanks,
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]