{"image_url":null,"published":"2024-04-22 00:00:00","description":"import threading count = 0 def increment(): global count for _ in range(100000): count += 1 threads = [threading.Thread(target=increment) for _ in range(2)] [t.start() for t in threads] [t.join() for t in threads] print(\"Expected:\", 200000) print(\"Actual:\", count)","author_name":"ryuichi1208","type":"rich","width":"100%","provider_name":"Hatena Blog","blog_url":"https://ryuichi1208.hateblo.jp/","height":"190","title":"\u3010Python\u3011\u30b9\u30ec\u30c3\u30c9\u30bb\u30fc\u30d5\u3067\u306a\u3044\u30b3\u30fc\u30c9","provider_url":"https://hatena.blog","categories":[],"version":"1.0","blog_title":"\u5730\u65b9\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u5b66\u7fd2\u65e5\u8a18","author_url":"https://blog.hatena.ne.jp/ryuichi1208/","url":"https://ryuichi1208.hateblo.jp/entry/2024/04/22/000000","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryuichi1208.hateblo.jp%2Fentry%2F2024%2F04%2F22%2F000000\" title=\"\u3010Python\u3011\u30b9\u30ec\u30c3\u30c9\u30bb\u30fc\u30d5\u3067\u306a\u3044\u30b3\u30fc\u30c9 - \u5730\u65b9\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u5b66\u7fd2\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}