lib/thread/promise.rb in thread-0.0.5 vs lib/thread/promise.rb in thread-0.0.6
- old
+ new
@@ -66,10 +66,18 @@
def cond
@cond ||= ConditionVariable.new
end
end
+class Thread
+ # Helper method to create a promise.
+ def self.promise
+ Thread::Promise.new
+ end
+end
+
module Kernel
+ # Helper method to create a promise.
def promise
Thread::Promise.new
end
end