<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Takachan</author_name>
  <author_url>https://blog.hatena.ne.jp/Takachan/</author_url>
  <blog_title>PG日誌</blog_title>
  <blog_url>https://takap-tech.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>.NET</anon>
  </categories>
  <description>インクリメント・デクリメントの非アトミック性 最初に前置きとして、インクリメントとデクリメントは分割不可能の最小単位の操作（＝アトミックな操作）じゃないですよと言う話をしたいと思います。 C#にインクリメント演算子（p++）とデクリメント演算子（p--）という操作がありますが、実装上の見た目は1行で記述できるのでこの操作って分割不可能の最小の処理単位で一発で値が変更されていると思うかもしれません。 が、実際は「MSDNのページ」によると以下の3ステップで計算が実行されます。 // このインクリメント処理は、、、 i++; // ★実際は以下の3ステップで実行される！ // 1) インスタンス変…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2026%2F03%2F11%2F005138&quot; title=&quot;【C#】Interlockedを使って同時実行数を制限する - PG日誌&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>2026-03-11 00:51:38</published>
  <title>【C#】Interlockedを使って同時実行数を制限する</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2026/03/11/005138</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
