• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SOPs are getting even after System exit code

 
Ranch Hand
Posts: 136
Android Eclipse IDE Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I realized that in Threading , even after System.exit(0) , I am getting some SOPs . How is it possible ?
 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
THANKS TO ALL
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic