chenzhiguo on Nostr: ...
两个线程都判断了为null,然后一起synchronized这一行,接下来不就发生两次对象创建吗?
Published at
2023-02-08 10:25:57Event JSON
{
"id": "79cb48c5a66e9378da8af2ee39cc6ef88460a58450c975a69f2ed9a44f948da3",
"pubkey": "aae9cfdb3113db442c1ad8d4c670a28091e5267748e71d2c1e189e423dbea1bf",
"created_at": 1675851957,
"kind": 1,
"tags": [
[
"e",
"02384d7b2cb74c728c4ee3cda470f1163b6e1feb37e9721cd42b5beb4b575c7e",
""
],
[
"e",
"cf3174e481f009e88fcc8ba8af07f46dc2efee33869d85741943bb20bfa9688e"
],
[
"p",
"5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2"
]
],
"content": "两个线程都判断了为null,然后一起synchronized这一行,接下来不就发生两次对象创建吗?",
"sig": "6687172ed91be8f0cb35e1353a604d6d7f32365499321ad88cbaf6c25beb19586b743712187befc7a0798f3fbe43e8b7f31acf9ae6bd8f6fddc6f77e71167376"
}