jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: svn commit: r1492987 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ oak-core/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/ oak-jcr/src/main/j...
Date Fri, 14 Jun 2013 09:51:28 GMT

On 14.6.13 10:45, Jukka Zitting wrote:
> Hi,
> On Fri, Jun 14, 2013 at 12:41 PM, Michael Dürig <mduerig@apache.org> wrote:
>> AFAIU to comply with the removeEventListener contract we either have to
>> interrupt the observation thread (like my implementation did) or live with
>> the deadlock caused by client handlers blocking on events (like you
>> experienced with RepositoryTest.observationDispose).
> I would rather do the latter. Interrupting threads is nasty business,

Yes and clients usually just swallow the InterruptedException instead of 
properly handling it and setting the thread's interrupted status... 
which might lead to deadlocks as well.

> and the potential blocking would only affect the client that's in
> charge of the troublesome listener.

Sounds good. I try to come up with something and change the expectation 
for the RepositoryTest.observationDispose test case.


View raw message