From 9b4da559550f0aaa769656d3687da01a8bfb68d3 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Wed, 23 May 2007 23:03:52 -0400 Subject: [PATCH] include fastthread and fix typo in await_any --- lib/concurrent/futures.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/concurrent/futures.rb b/lib/concurrent/futures.rb index 04c2999..33c4ff9 100644 --- a/lib/concurrent/futures.rb +++ b/lib/concurrent/futures.rb @@ -7,6 +7,10 @@ # require 'thread' +begin + require 'fastthread' +rescue LoadError +end require 'thwait' module Concurrent @@ -40,7 +44,7 @@ end def await_any( *futures ) threads = futures.map { |future| Thread.new { Futures::await future } } begin - threads.index WaitThreads.new( *threads ).wait_next + threads.index ThreadsWait.new( *threads ).wait_next ensure threads.each { |thread| thread.raise RuntimeError } end -- 2.11.4.GIT