<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yohei-a</author_name>
  <author_url>https://blog.hatena.ne.jp/yohei-a/</author_url>
  <blog_title>ablog</blog_title>
  <blog_url>https://yohei-a.hatenablog.jp/</blog_url>
  <categories>
    <anon>Linux</anon>
  </categories>
  <description>ノンブロッキングI/Oについて調べてみました*1。ノンブロッキングI/OはSQLの「SELECT ... FOR UPDATE NOWAIT」のイメージに近いのかなと思いました。通常は待つケースで待たずにエラーが返ってきて、アプリケーション側でエラーハンドリングしてリトライするといった使い方になるようですね。ポイントは以下の点だと思います。 通常、ノンブロッキングI/OはネットワークI/Oに使い、ディスクI/Oには使わない。 open()にO_NONBLOCKフラグを渡したり、 ioctl(fd, FIONBIO, 1)でノンブロッキングモードにすることができる。 ノンブロッキングモードでは通…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohei-a.hatenablog.jp%2Fentry%2F20111211%2F1323618367&quot; title=&quot;ノンブロッキング I/O について調べてみた - ablog&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>https://images-fe.ssl-images-amazon.com/images/I/51Oy0hCw4eL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-12-11 00:46:07</published>
  <title>ノンブロッキング I/O について調べてみた</title>
  <type>rich</type>
  <url>https://yohei-a.hatenablog.jp/entry/20111211/1323618367</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
