avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: Throttling Excalibur
Date Fri, 02 Nov 2001 17:39:55 GMT

> -----Original Message-----
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> Sent: den 2 november 2001 16:50
> To: Avalon Developers List
> Subject: Re: Throttling Excalibur
> My initial attempts to provide a BlockingHardResourceLimitingPool
> (i.e. one
> that waits until something is released) resulted in DeadLock in certain
> circumstances.  This is IMO a bad thing--because once you have deadlock,
> you can't get ANY more connection objects.

Hmmm... It looks like something the DjikstraSemaphore class could be used
for. Use semaphore.aquire() in get() and semaphore.release() in put(). This,
of course, means that each thread can only aquire one instance from the
pool, to prevent deadlock. Is there a way to recognize when a thread has
taken two items out of the pool and optionally throw an exception in that

Berin, I'd be quite happy to take a look at whatever code it is you have for
the blocking pool, along with the test cases (if any).


To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message