function WaitFor: LongWord;
unsigned __fastcall WaitFor();
Waits for the thread to terminate and then returns the value of the ReturnValue property.
Call WaitFor to obtain the value of ReturnValue when the thread finishes executing. WaitFor doesn't return until the thread terminates, so the thread must exit either by finishing the Execute method or by exiting when the Terminated property is true.