single thread to multithread