Replaces calls to the deprecated function  by .
Merge branch 'move_spawn_from_task_to_thread'