added yield instruction WaitForMultipleEvents