{"provider_url":"https://hatena.blog","type":"rich","blog_title":"\u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc","author_name":"nishiohirokazu","url":"https://nishiohirokazu.hatenadiary.org/entry/20101207/1291736111","height":"190","image_url":null,"author_url":"https://blog.hatena.ne.jp/nishiohirokazu/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20101207%2F1291736111\" title=\"tmp.py \u305d\u306e2 - \u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":[],"description":"\u7ffb\u8a33\u983c\u307e\u308c\u305f\u3093\u3067\u7ffb\u8a33\u3057\u305f from threading import Thread max = 3 lmax = 50000000 ary = [[0, 0]] class MyThread(Thread): def run(self): for _i in range(lmax): e = ary[-1] if e[0] != self.name: e = [self.name, 0] ary.append(e) e[1] += 1 threads = [MyThread(name=i) for i in \"123\"] for th in threads: th.start() for th\u2026","title":"tmp.py \u305d\u306e2","blog_url":"https://nishiohirokazu.hatenadiary.org/","published":"2010-12-07 00:35:11","width":"100%","provider_name":"Hatena Blog"}