{"categories":["Python","Rust"],"author_name":"atsuhiro-me","author_url":"https://blog.hatena.ne.jp/atsuhiro-me/","image_url":null,"title":"\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u3092\u5b9f\u88c5\u3059\u308b","description":"\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3 \u3068\u306f\uff0c\u305d\u306e\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c1\u3064\u3057\u304b\u751f\u6210\u3055\u308c\u306a\u3044\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u3053\u3068\u3067\u3042\u308a\uff0c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5168\u4f53\u30671\u3064\u306e\u5171\u901a\u30c7\u30fc\u30bf\u304c\u3042\u308c\u3070\u3088\u3044\uff0c\u3068\u3044\u3046\u6642\u306b\u91cd\u5b9d\u3057\u307e\u3059\uff0e \u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u306e\u3067\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\uff0e \u901a\u5e38\u306e\u30af\u30e9\u30b9\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u308b\uff0e \u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\uff0e Python\u3067\u5b9f\u88c5 __new__(cls) \u3092\u5229\u7528\u3057\uff0cthreading.Lock() \u3092\u8ffd\u52a0\u3057\uff0c\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5b9f\u88c5\u3057\u307e\u3057\u305f\uff0e import threading class ThreadSafeSingleton(): _self = None _lock = threading.Lock() def _\u2026","height":"190","provider_name":"Hatena Blog","width":"100%","blog_url":"https://pc.atsuhiro-me.net/","version":"1.0","provider_url":"https://hatena.blog","blog_title":"\u307f\u30fc\u306e\u307a\u30fc\u3058","published":"2020-02-13 02:20:12","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpc.atsuhiro-me.net%2Fentry%2F2020%2F02%2F13%2F022012\" title=\"\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u3092\u5b9f\u88c5\u3059\u308b - \u307f\u30fc\u306e\u307a\u30fc\u3058\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://pc.atsuhiro-me.net/entry/2020/02/13/022012","type":"rich"}