ThreadReturnValue
ThreadReturnValue (tgID, index)
The ThreadReturnValue function returns the value that the specified thread function returned when it exited. Returns NAN if thread is still running. tgID is the thread group ID returned by ThreadGroupCreate and index is the thread number.
When ThreadGroupWait is called, Igor updates certain internal variables including variables that track whether a thread has finished and what result it returned. Therefore you must call ThreadGroupWait before calling ThreadReturnValue.
See Also
ThreadGroupCreate, ThreadSafe Functions, ThreadSafe Functions and Multitasking