mixed wait()
Waits for the thread to complete, and then returns the value returned from the thread function.