adding threads to task_threads