use Thread.join instead of ThreadsWait.all_waits (for jruby)