chenzhiguo on Nostr: #[0] 这段代码线程安全吗?class Singleton1{private static Singleton1 ...
dave (npub1tsg…htk4) 这段代码线程安全吗?class Singleton1{private static Singleton1 singleton1 = new Singleton1(); public static Singleton1 getInstance(){ return singleton1; }}
Published at
2023-02-08 08:46:13Event JSON
{
"id": "02384d7b2cb74c728c4ee3cda470f1163b6e1feb37e9721cd42b5beb4b575c7e",
"pubkey": "aae9cfdb3113db442c1ad8d4c670a28091e5267748e71d2c1e189e423dbea1bf",
"created_at": 1675845973,
"kind": 1,
"tags": [
[
"p",
"5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2"
]
],
"content": "#[0] 这段代码线程安全吗?class Singleton1{private static Singleton1 singleton1 = new Singleton1(); public static Singleton1 getInstance(){ return singleton1; }}",
"sig": "8561366f9ed69031afc9ac0af5a7eb44f3967e3ba8d434e66ea4b1b973938638033089ae69405bf34b40193db1433d5d9ad3ee863f60e87f038ec8d5d764e308"
}