Introduce concept of wait for a thread.