First, a really dumb question, I was just wondering what the waiting \'parking\' means ? Is the thread waiting to be parked or is it just been parked and therefore is in wai
As per the java Thread State Documentation, A thread can go to WAITING state for three reasons:
When you call a park method on a Thread, it disables the thread for thread scheduling purposes unless the permit is available. You can call unpark method to make available the permit for the given thread, if it was not already available.
So, when your Thread is in WAITING mode by LockSupport.park, it will show you as WAITING (parking).
Please make note that, you can call park on current Thread only. This is very helpful mechanism to implement Producer-Consumer Design Pattern.