Difference Between Wait And Park Methods In Java Thread

If you are familiar with thread dump or at least looked at it couple of times, probably you would have noticed WAITING  & WAITING (parking) states. So what’s the difference? In Java, we have Object.wait() and Unsafe.park() methods. Both of them will suspend the running thread & put it in waiting state. But these two methods work on different principles. Object.wait() results in WAITING state whereas Unsafe.park() method … Read more