Switched from multiprocessing to threading