Synchronization paragraph from java documentation -


everyone!

i reading java doc this:

https://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html

could anyone,please, tell more about

the java programming language neither prevents nor requires detection of deadlock conditions. programs threads hold (directly or indirectly) locks on multiple objects should use conventional techniques deadlock avoidance, creating higher-level locking primitives not deadlock, if necessary.

thanks.

it means "do not expect java handle or avoid deadlocks you. if not write code there no way java tell in advance. so, responsibility make sure code not cause deadlocks".


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -