Added conversion of WaitHandles to Tasks.