lib/jvertica.rb in jvertica-0.2.0 vs lib/jvertica.rb in jvertica-0.2.1
- old
+ new
@@ -179,14 +179,15 @@
begin
if block_given?
i, o = IO.pipe
+ copy_stream_thread = Thread.current
thread = Thread.new do
begin
yield(o)
rescue => e
- Thread.main.raise e
+ copy_stream_thread.raise e
end
o.close
end
stream.addStream(org.jruby.util.IOInputStream.new(i))
else