On 14.6.13 10:45, Jukka Zitting wrote:
Hi,

On Fri, Jun 14, 2013 at 12:41 PM, Michael Dürig <[email protected]> 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.

Michael

Reply via email to