Multithreading test code.