File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOPs are getting even after System exit code

 
buntha Choudhary
Ranch Hand
Posts: 136
Android Eclipse IDE Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I realized that in Threading , even after System.exit(0) , I am getting some SOPs . How is it possible ?
 
M K Rayapudi
Ranch Hand
Posts: 160
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
means, your main thread/method is completing its job,
but, other threads are running.
 
buntha Choudhary
Ranch Hand
Posts: 136
Android Eclipse IDE Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually before Threading , I used to know that after calling System.exit(0) , the program stops to work and exits and even after reading the System.exit(0) , I am getting SOPs means still some thread is running . So in this point I am getting confused like how I am getting SOPs after System.exit(0) , is it like even after System.exit command , the compiler does not shut down the code if in case any other threads is still have the value.
 
Steve Luke
Bartender
Pie
Posts: 4181
21
IntelliJ IDE Java Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.exit() begins the 'normal shutdown' procedure which includes executing shutdown hooks and finalizers. If any of these hooks/finalizers call System.out.println() then the output may be recorded. Also, and especially of you have a lot of output statements in a tight loop, the output to System.out.println() is buffered which means the output may be stored for a brief time before being sent to the console. So if you shutdown that output stream is generally flushed and any stored output would be pushed to the console.
 
buntha Choudhary
Ranch Hand
Posts: 136
Android Eclipse IDE Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS TO ALL
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic