Roshan
Roshan

Reputation: 667

What Happens to the Daemon Threads once JVM exists?

Most documents say "JVM exits when there are no non-daemon threads", so then what happens to the Daemon Threads? How are the exceptions handled , their objects handled ... ?

Can anyone explain the post-JVM_Exit life of Daemon threads ?

Upvotes: 0

Views: 69

Answers (1)

user207421
user207421

Reputation: 310909

Can anyone explain the post-JVM_Exit life of Daemon threads ?

There isn't any. The process has exited; all its threads are gone; all its memory is released to the operating system; all its semaphores and locks are released; all its open files and sockets are closed, not necessarily cleanly.

Upvotes: 1

Related Questions