...
Wiki Markup |
---|
One technique for preventing this vulnerability is the _private lock object_ idiom \[[Bloch 2001|AA. Bibliography#BlochReferences#Bloch 01]\]. This idiom uses the intrinsic lock associated with the instance of a private final {{java.lang.Object}} declared within the class instead of the intrinsic lock of the object itself. This idiom requires the use of synchronized blocks within the classâs methods rather than the use of synchronized methods. Lock contention between the classâs methods and those of a hostile class becomes impossible because the hostile class cannot access the private final lock object. |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d13b945f1597bcc1-39ceec4f-44834989-97769cc1-4354b7be457d3a3e704470d4"><ac:plain-text-body><![CDATA[ | [[Bloch 2001 | AA. Bibliography#Bloch References#Bloch 01]] | Item 52. Document Thread Safety | ]]></ac:plain-text-body></ac:structured-macro> |
...