Task 'wait' code moved to TaskDependency. Local/global task dependency created. A wait statement can wait on another thread's task