Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threads

 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are user, daemon, worker and green threads. I know user and daemon, but what about the other two?
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically, green threads are JDK-provided threads and native threads are OS-provided threads. In clear, if your JVM uses green threads, there will only be one process as far as the OS is concerned, and the JVM is responsible for simulating the different threads of your application within its own thread.
If you use native threads, there will normally be one OS process per thread in your application.
Worker threads are just threads you use to carry out some task, kind of like,...,well, a worker thread
Read a little more about that here:
http://developer.java.sun.com/developer/qow/archive/97/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic