ThreadStart
ThreadStart tgID, index, WorkerFunc (param1, param2,...)
The ThreadStart operation starts the specified function running in a preemptive thread.
Parameters
tgID is thread group ID returned by ThreadGroupCreate, index is the desired thread of the group to set up to execute the specified ThreadSafe WorkerFunc.
Details
The worker function starts running immediately.
The worker function must be defined as ThreadSafe and must return a real or complex numeric result.
The worker function's return value can be obtained after the function finishes by calling ThreadReturnValue. Igor records the fact that a thread has terminated when you call ThreadGroupWait so you must call ThreadGroupWait before calling ThreadReturnValue.
The worker function can take variable and wave parameters. It cannot take pass-by-reference parameters or data folder reference parameters.
Any waves you pass to the worker are accessible to both the main thread and to your preemptive thread. Such waves are marked as being in use by a thread and Igor will refuse to perform any manipulations that could change the size of the wave.