<Swing Dev> Ways to cancel SwingWorker running task

neugens.limasoftware@gmail.com neugens.limasoftware at gmail.com
Wed Jul 13 06:10:48 UTC 2011


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" <ims3g at 126.com>
Data: mer, lug 13, 2011 01:49
Oggetto: <Swing Dev> Ways to cancel SwingWorker running task
A: "Paulo Levi" <i30817 at gmail.com>
Cc: <swing-dev at openjdk.java.net>


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" <i30817 at gmail.com> 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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20110713/de9c9a53/attachment.html>


More information about the swing-dev mailing list