Skip to main content
gamedev.net
🔒 Locked

[java] Daemon

Started by cmdpzdr 0 replies 200+ views
Original Post
cmdpzdr
cmdpzdr
I need an sample code about daemons in Java. I''m developing an application with daemons.
Saludos Claudia
bslayerw
bslayerw

  
Thread deamonThread = new Thread(new Runnable() {
public void run() {
System.out.println("Daemon thread run");
//.....

System.out.println("Daemon thread done");
}
}
);

deamonThread.setDaemon(true);

deamonThread.start();


A daemon thread dies when all other threads in your application die.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.