Synchronized Block inside run method

前端 未结 2 1575
时光取名叫无心
时光取名叫无心 2021-02-10 23:48

If I have something like below, so what does that mean inside synchronized block

synchronised (syncObject) {

Basically, it will me

2条回答
  •  长情又很酷
    2021-02-11 00:45

    No, attributeMethod is already running within the scope of a synchronized block; no need to mark it as such, unless you intend to call it concurrently outside this block.

提交回复
热议问题