Initial multithreading support.