Originally posted by memati bas:
Are there any advantage of daemon threads since they are still running even though all threads die ???
Originally posted by memati bas:
Does the following code have the same effect with the daemon threads ??
Please explain your answer...
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
They're intended for things like background services happening that shouldn't keep an application open.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I'm a Hood Ornament
Originally posted by Megs Maquito:
Isn't it true that the main() method is in the daemon thread? which is also the main thread?
Originally posted by Stan James:
[QB]Here are a couple real examples: I wrote a little web server with two background threads. One expires user sessions after nn minutes, another unlocks files locked for editing at a similar interval. These are daemons. When I shut down the web server there is no need for these to keep running.
.
.
.
Thanks for this...
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|