<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ku-ma-me</author_name>
  <author_url>https://blog.hatena.ne.jp/ku-ma-me/</author_url>
  <blog_title>まめめも</blog_title>
  <blog_url>https://mametter.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>ref: http://d.hatena.ne.jp/ku-ma-me/20080111/p1shinh さんや kikx さんに指摘されました (kikx さんからはチャットで) が、アサーションで使えますね。「関数 foo が呼ばれるときは mutex がロックされている」という性質を保証したいとき、以下のようにチェックを書くとか。 def foo raise unless mutex.locked? # ... end 菊さんの意見では、「ロックされているかどうか」を返す mutex.locked? より、「このスレッドがロックしているかどうか」を返す Mutex.own? の方がいいと…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmametter.hatenablog.com%2Fentry%2F20080114%2Fp3&quot; title=&quot; Mutex#locked? はいらない子？の続き - まめめも&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-01-14 00:00:02</published>
  <title> Mutex#locked? はいらない子？の続き</title>
  <type>rich</type>
  <url>https://mametter.hatenablog.com/entry/20080114/p3</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
