<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>haru-s</author_name>
  <author_url>https://blog.hatena.ne.jp/haru-s/</author_url>
  <blog_title>...ing logging 4.0</blog_title>
  <blog_url>https://haru-s.hatenablog.com/</blog_url>
  <categories>
    <anon>D言語</anon>
  </categories>
  <description>適切に synchronized ブロックを使えば利用者側で気をつける必要がなくなる． クラスメンバの中での synchronized は synchronized (this) と同じ． import std.stdio; import core.thread; class Bank { private int money_; void payin(int m) { synchronized { money_ += m; } } void payout(int m) { synchronized { // お金があるときだけ出金する if (money_ - m &gt; 0) { money_ …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fharu-s.hatenablog.com%2Fentry%2F20110415%2F1302890874&quot; title=&quot;スレッドセーフな銀行クラス - ...ing logging 4.0&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>2011-04-15 03:07:54</published>
  <title>スレッドセーフな銀行クラス</title>
  <type>rich</type>
  <url>https://haru-s.hatenablog.com/entry/20110415/1302890874</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
