Update ThreadManager.php