Fixes intermittent ConcurrencyError seen in JRuby
Merge pull request #670 from connamara/thread_interceptor

Fixes intermittent ConcurrencyError seen in JRuby