[concurrency-interest] Migrating DNS problem to j.u.c

robert lazarski robertlazarski at gmail.com
Thu Dec 14 15:53:21 EST 2006

On 12/14/06, Joe Bowbeer <joe.bowbeer at gmail.com> wrote:
> Your cancellation is requesting an interrupt via cancel(true), so it seems
> that ictx.list() isn't responding to the interrupt.
> Can you enhance ictx.list() to quit when it is interrupted?

What's happening AFAICT via 'netstat -ancp' is that the
DirContext.list() sockets that were cancelled by the future get stuck
in 'SYN_SENT' until whenever it decides to switch to 'ESTABLISHED' ,
where it then throws 'java.net.ConnectException: Connection timed out'
at the line of ictx.list() in the Callable inside the Runnable. Any
idea on what I can do about that?

> Btw, when in the timeline is ictx.close() called, and how long does it take
> to complete?

itcx.close() is called in the same finally block as exec.shutdown().
It returns almost immediately, less than one second. I tried putting
itcx.close() before shutdown(), to no effect.

Thanks everyone,

More information about the Concurrency-interest mailing list