threadpool 0.0.1.2 → 0.0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/threadpool.rb +4 -1
- data/threadpool.gemspec +1 -1
- metadata +1 -1
data/lib/threadpool.rb
CHANGED
@@ -14,7 +14,10 @@ require 'thread'
|
|
14
14
|
module Awakenable
|
15
15
|
def sleep (time = nil)
|
16
16
|
@awakenable ||= IO.pipe
|
17
|
-
|
17
|
+
|
18
|
+
begin
|
19
|
+
@awakenable.first.read_nonblock 2048
|
20
|
+
rescue Errno::EAGAIN; end
|
18
21
|
|
19
22
|
IO.select([@awakenable.first], nil, nil, time)
|
20
23
|
end
|
data/threadpool.gemspec
CHANGED