This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Mastering Corda: Blockchain for Java Developers and have Jamiel Sheikh on-line!
See this thread for details.
Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Killing Threads

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I'm using oracle chart builder for presenting data in my
application. I use it after supplying its data for gif file
generation. The chart is stacked bar but I don't think this is the
problem.
The problem is that it generates the gif file successfully but my
application is still running after the main method is finished, I
debugged it and I found about three threads are up:
Thread[AWT-EventQueue-0]
Thread[SunToolkit.PostEventQueue-0]
Thread[AWT-Windows]
I doubted my code - but I'm taking it copy paste from developer's
guide - and I debugged another Java file from a sample that comes with
the kit and the same problem happened ?!?!?
Does anyone know y?
I saw lots of SunToolkit.PostEventQueue-0 problems in google
groups, but I don't find matching my situation.
I used in testing both Oracle JDeveloper 9i release 3, and IBM
WebSphere Studio Application Developer 4.0.3
Thanks
 
Salman Yasser
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I couldn't use System.exit(), because I am working in a periodical robot ( using Timer and TimerTask ) so exit will exit all application while I want to kill active threads of current task only.
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ahh, a perfectionist Don't worry about those GUI threads. Once you start them, you can not get rid of them sans exit(). Some consider it a problem, but c'est la vie.
Your code and program are working correctly.
 
Well THAT's new! Comfort me, reliable tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic