I have a questions about Java thread and OS thread, and I read Java Threads vs Pthreads and Java Threads vs OS Threads but I does not find an answer to my confusions.
I had considered before we call start(), no OS thread is created .
But according to https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.State.html ,
A thread that has not yet started is in
NEW
state.
Am I wrong or the states defined at java doc are not only to mark the state of Thread instance?
My question is :
- what exactly happens when we create a Thread instance but before calling
start()
- when does a OS thread really created in Java