<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ryuichi1208</author_name>
  <author_url>https://blog.hatena.ne.jp/ryuichi1208/</author_url>
  <blog_title>地方エンジニアの学習日記</blog_title>
  <blog_url>https://ryuichi1208.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>概要 Python × 非同期IOなアプリケーションで色々あったので調査メモ 本編 非同期IO環境で同期IOを発行する場合、asyncio.to_thread または loop.run_in_executor を使用することで、イベントループをブロックせずに同期処理を実行できます。asyncio.to_thread を使用する場合、生成されるのは LWP（Lightweight Process） ではなく、スレッドです。具体的には、asyncio.to_thread は、同期I/Oを非同期的に実行するためにスレッドプールを使いますが、そのスレッドが LWP としてカーネルによって管理されること…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryuichi1208.hateblo.jp%2Fentry%2F2025%2F05%2F13%2F113439&quot; title=&quot;【Python】非同期環境で同期IOを発行する方法 - 地方エンジニアの学習日記&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>2025-05-13 11:34:39</published>
  <title>【Python】非同期環境で同期IOを発行する方法</title>
  <type>rich</type>
  <url>https://ryuichi1208.hateblo.jp/entry/2025/05/13/113439</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
