...

/

Reentrant Locks & Condition Variables

Reentrant Locks & Condition Variables

Reentrant Lock

Java's answer to the traditional mutex is the reentrant lock, which comes with additional bells and whistles. It is similar to the implicit monitor lock accessed when using synchronized methods or blocks. With the reentrant lock, you are free to lock and unlock it in different methods but not with ...