Switched to concurrent.futures for threading