Hi I am developing a program which deals with graphic generation by reading a xpdl file (its a kind of xml file). For this, I am using an open source tool which does this job. Ive modified its code to suit my need. The only problem remaining it that its basically a GUI tool which shows generated graphic using AWT. Because of this it starts many AWT related thread, please see the list below.
"DestroyJavaVM" prio=5 tid=0x00036948 nid=0xc78 waiting on condition [0..7fad8]
"TimerQueue" daemon prio=5 tid=0x00a09e98 nid=0x764 in Object.wait() [3d3f000..3d3fd8c]
"AWT-EventQueue-0" prio=7 tid=0x04097c60 nid=0xba0 in Object.wait() [3cff000..3cffd8c]
"AWT-Shutdown" prio=5 tid=0x02dc2d60 nid=0x5c4 in Object.wait() [380f000..380fd8c]
"Java2D Disposer" daemon prio=10 tid=0x02dbb190 nid=0xe60 in Object.wait() [36af000..36afd8c]
As "AWT-Shutdown" and "AWT-EventQueue-0" thread are non demon so my program doesnt quit even after finishing its job. I some how need to destroy these threads so that my program can finish.
I can not use interrupt method of Thread class because it will throw java.lang.InterruptedException as these thread are in blocked state by calling wait() method of some object.
So all this description boils down to one single question, Is there any way to kill a blocked thread, either gracefully or abruptly? Or may be if any body can suggest some other solution to this problem.