<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>unageanu</author_name>
  <author_url>https://blog.hatena.ne.jp/unageanu/</author_url>
  <blog_title>うなの日記</blog_title>
  <blog_url>https://unageanu.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>扱うデータ数が多いと若干性能が気になる感じのGeneratorですが、callccじゃなくてThreadを使えばちょっとは早くなったりするんじゃね?と思って作ってみました。next?とnextだけ、Queueを使ってさくっと実装。 require 'thread' # スレッドを使ったGenerator class ThreadUseGenerator def initialize( enum, buff_size=nil ) @alive = true @alive_mutex = Mutex.new @q = buff_size ? SizedQueue.new( buff_size ) …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20080908%2F1220867778&quot; title=&quot; Threadを使ったGeneratorを作ってみた - うなの日記&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-09-08 18:56:18</published>
  <title> Threadを使ったGeneratorを作ってみた</title>
  <type>rich</type>
  <url>https://unageanu.hatenablog.com/entry/20080908/1220867778</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
