<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kwatch</author_name>
  <author_url>https://blog.hatena.ne.jp/kwatch/</author_url>
  <blog_title>kなんとかの日記</blog_title>
  <blog_url>https://kwatch.hatenadiary.org/</blog_url>
  <categories>
    <anon>tech</anon>
    <anon>python</anon>
  </categories>
  <description>476 名前: デフォルトの名無しさん Mail: sage 投稿日: 2008/03/05(水) 23:48:04 ファイルの排他制御のテストプログラムを書いています。 ただ単に１つのカウントファイルを１００万回インクリメントするプログラム #!/usr/bin/env python for i in range(1000000) : f = open(&quot;count-file&quot;, &quot;r+&quot;) fcntl.flock(f.fileno(), fcntl.LOCK_EX) cnt = f.readline() cnt = int(cnt) + 1 f.seek(0) f.write(&quot;%d\n&quot;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkwatch.hatenadiary.org%2Fentry%2F20080318%2F1205811694&quot; title=&quot; ファイルを unlock して問題になるくらいなら、OS 任せにするほうがよい - kなんとかの日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-03-18 12:41:34</published>
  <title> ファイルを unlock して問題になるくらいなら、OS 任せにするほうがよい</title>
  <type>rich</type>
  <url>https://kwatch.hatenadiary.org/entry/20080318/1205811694</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
