chenzhiguo on Nostr: ...
不对,方法体内使用synchronized与方法定义上使用是不一样的,不能保证单例对象线程安全
Published at
2023-02-08 11:38:47Event JSON
{
"id": "d003c94cb7a43f41ac70c0e93d4ae13aba4132498e328329d755b0cc6834e7ce",
"pubkey": "aae9cfdb3113db442c1ad8d4c670a28091e5267748e71d2c1e189e423dbea1bf",
"created_at": 1675856327,
"kind": 1,
"tags": [
[
"e",
"02384d7b2cb74c728c4ee3cda470f1163b6e1feb37e9721cd42b5beb4b575c7e",
""
],
[
"e",
"c04c89e18fa9a71f1ee4a2280126ced7cc23862138c5f48962d9330069b97968"
],
[
"p",
"5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2"
]
],
"content": "不对,方法体内使用synchronized与方法定义上使用是不一样的,不能保证单例对象线程安全",
"sig": "d05b384abf6b2d57350510fa1b0513ee70f1dbc18d5786a5e4371c79bfb1bebbe0d35ec6f2f4daa9c888a89157f1a1549debe98d60fbddc2587f5f96a6a5e42b"
}