;keysharp #import Ks { RealThread } MsgBox(s) => FileAppend(s "`n", "*") ThreadFunc() { Sleep 1000 MsgBox "Background Thread" } theThread := RealThread(ThreadFunc) ; Create and start the thread. MsgBox "Main Thread" theThread.Wait() ; Wait for the thread to complete before continuing. MsgBox "Main Thread Again"