I am using JRuby and running my test case in parallel using parallel_test gem.
In one of the tests I need to synchronize few line of code. So how I can synchronize those couple of code in JRuby.
loop do
begin
mutex.synchronized do
read = out.readpartial(1000000)
result << read
unless silence
$stdout.print read
$stdout.flush
end
end
end
end rescue EOFError