BAEL-1263 Daemon Threads in Java
This commit is contained in:
parent
31e2f177ad
commit
1be0d76f8c
@ -3,7 +3,8 @@ package com.baeldung.concurrent.daemon;
|
||||
public class NewThread extends Thread {
|
||||
|
||||
public void run() {
|
||||
for (int i = 0; i < 10; i++)
|
||||
System.out.println("New Thread is running...");
|
||||
while (true)
|
||||
for (int i = 0; i < 10; i++)
|
||||
System.out.println("New Thread is running...");
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,4 @@ public class DaemonThreadTest {
|
||||
daemonThread.start();
|
||||
daemonThread.setDaemon(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenUserThread_whenStartThread_thenFalse() {
|
||||
NewThread daemonThread = new NewThread();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user