<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>cypher256</author_name>
  <author_url>https://blog.hatena.ne.jp/cypher256/</author_url>
  <blog_title>cypher256's blog</blog_title>
  <blog_url>https://cypher256.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Java 21で導入された仮想スレッドで、プラットフォームスレッドに影響を与えずに仮想スレッドに対してsynchronizedと同じ効果を得るために、ReentrantLockクラスの使用方法について投稿しました。通常のReentrantLockの使用方法は柔軟性がありますが、lock()とtryの間に処理を書くことができ、またfinallyにunlock()を書かないと不具合が発生する可能性があります。そのため、ReentrantLockを安全に使うための3つの方法を紹介しています。 qiita.com ReentrantLockをtry-with-resourcesで使用する方法AutoC…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcypher256.hatenablog.com%2Fentry%2F2023%2F11%2F11%2F081810&quot; title=&quot;ReentrantLock を try-with-resources で安全に使う - cypher256&amp;#39;s blog&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>2023-11-11 08:18:10</published>
  <title>ReentrantLock を try-with-resources で安全に使う</title>
  <type>rich</type>
  <url>https://cypher256.hatenablog.com/entry/2023/11/11/081810</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
