#1744 added an option so that the parent task can also wait on the slave for the child tasks to finish