Add tests of multithreading functionality introduced in #156
Add tests of multithreading functionality introduced in #156