Thread Safety (Concurrency)


Thread safety is largely built into the Java language, either via specialised keywords such as synchronized or via standard library objects.


The  synchronized keyword (recognised by the Java compiler) can be used to enforce synchronous access (i.e. non-concurrent) to class methods.

It is a quick tool to reach for if you have basic concurrency issues.

Posted: July 26th, 2016 at 3:43 pm
Last Updated on: July 26th, 2016 at 9:34 pm