lol2.rb

Yusuke Endoh, 11/06/2012 12:16 AM

Download (189 Bytes)

 
1
#! /usr/bin/env ruby
2
require 'threadpool'
3

    
4
set_trace_func(proc {|*a| p [Thread.current, a] })
5

    
6
t = ThreadPool.new(1)
7
t.process { sleep 0.01; puts 'lol'; t.shutdown! }
8
puts 'joining'
9
t.join