- For synchronization in Java one can use synchronized keyword.
- Keyword synchronized is not equivalent to atomic, but synchronization can be used to achieve atomicity.
- When subclassing a class overridden method should also define synchronized in its signature.
- A synchronized method can call another synchronized method on its own instance.
This blog is a collection of minds around linux, java, javascript, etc. Looking for great opportunities.
воскресенье, 1 июля 2018 г.
Java synchronized keyword
Java multithreading has 2 key aspects - visibility and automicity.
Подписаться на:
Комментарии к сообщению (Atom)
Комментариев нет:
Отправить комментарий