Hi Mario, Thanks for your suggestion! After running some tests with JDK6.0, I find Thread.stop can terminate the thread even if it's uninterruptible(ThreadDeath exception on the running thread stack). Seems some statements in the article are obsolete now?
Thanks and Best Regards, Xmly At 2011-07-13 14:10:48,"neugens.limasoftware"<[email protected]> wrote: I fear you may have an architectural problem here. You probably just need to wrap the library you are using into a more high level one that can deal with interruption. Thread.stop is a bad idea in general, beside, it will not help if the library itself for some reason tries to be "uninterruptible". Please, refer to this very good page for more information: http://download.oracle.com/javase/1.4.2/docs/guide/misc/threadPrimitiveDeprecation.html The article that Roman posted is also one of my favourite on the subject. Cheers, Mario -- Sent from HTC Desire... pgp key:http://subkeys.pgp.net/ PGP Key ID: 80F240CF Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF http://www.icedrobot.org Proud GNU Classpath developer:http://www.classpath.org/ Read About us at:http://planet.classpath.org OpenJDK:http://openjdk.java.net/projects/caciocavallo/ Please, support open standards: http://endsoftpatents.org/ ----- Reply message ----- Da: "ximalaya" <[email protected]> Data: mer, lug 13, 2011 01:49 Oggetto: <Swing Dev> Ways to cancel SwingWorker running task A: "Paulo Levi" <[email protected]> Cc: <[email protected]> Hi Paulo, Thanks! Agree with you. While sometimes we need to use 3rd party libraries which are out of our control... Thanks, Xmly At 2011-07-13 07:36:22,"Paulo Levi" <[email protected]> wrote: Every task can be interruptible... if you check regularly. Even inputstreams can be interruptible if you have a wrapper bufferinputstream that checks for the interrupt status.
