use the block in a thread in the jruby monkeypatch
Merge pull request #22 from damphyr/jruby-block

use the block in a thread in the jruby monkeypatch