What are Daemon threads and how can a thread be created as

Q

What are Daemon threads and how can a thread be created as Daemon?

✍: Guest

A

Daemon thread's run in background and stop automatically when nothing is running program. Example of a Daemon thread is "Garbage collector". Garbage collector runs until some .NET code is running or else its idle.
You can make a thread Daemon by
Thread.Isbackground=true

2007-10-22, 5020👍, 0💬