Update threads.py