<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>moriyoshi</author_name>
  <author_url>https://blog.hatena.ne.jp/moriyoshi/</author_url>
  <blog_title>moriyoshiの日記</blog_title>
  <blog_url>https://moriyoshi.hatenablog.com/</blog_url>
  <categories>
    <anon>pthread</anon>
    <anon>dcl</anon>
  </categories>
  <description>「ストアドを使ってWebスクレイピングしよう！」で作ったUDFでは、本来ステートレスに作らないといけないUDFを強引にステートフルに扱うために、MySQLが1コネクション1スレッドモデルであることをいいことにTLSを使ったのであるが、さて、TLSを使うためには、必ずTLSのキーを予め確保しておかないといけないから、初期化ルーチンが必要となるのだ。しかし、ELFの_init()やWin32DLLのDllMain()に頼ったりするのも、将来的に面倒なことになるかもしれないから、多少のオーバーヘッドは覚悟でpthread_once()を使うことにしたのだった。しかし、この関数の挙動はよく考えるととて…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmoriyoshi.hatenablog.com%2Fentry%2F20100715%2F1279171167&quot; title=&quot;pthread_once() の glibc における実装 - moriyoshiの日記&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>2010-07-15 14:19:27</published>
  <title>pthread_once() の glibc における実装</title>
  <type>rich</type>
  <url>https://moriyoshi.hatenablog.com/entry/20100715/1279171167</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
