Method Thread():start() Foundation
Executes program code in a thread.
:start( [<cFuncName>|<bCodeBlock>], ;
[<xParamList,...>] ) --> lSuccess
If the thread is started, the method :start() returns the value .T. (true), otherwise it returns .F. (false).
The method :start() starts the thread which is managed by the Thread object and executes the function <cFuncName> or evaluates the code block <bCodeBlock>. The parameters <xParamList> are passed on to the function or code block, respectively. At the beginning and at the end of the method, functions or code blocks are executed if they are specified in the instance variables :atStart and :atEnd. As long as program code is running in the thread, the instance variable :activecontains the value .T. (true). As soon as the program code has ended, :active contains .F. (false) and the return value of <cFuncName>or <bCodeBlock> is assigned to the instance variable :result.
Repeated calls to :start() are rejected as long as the thread is active. The method can only be called again when the instance variable :active contains the value .F. (false).
When a start time is defined with :setStartTime(), the Thread object delays program execution in the thread until this time is reached. Also, if a time interval for repeated execution is specified with:setInterval(), the program code is restarted automatically in the thread.
When the parameter <cFuncName> is not specified, the method :start() passes all parameters from <xParamList> to the method :execute(). This method can only be called by subclasses of the Thread class. This allows the Thread class to be modified to fit user-specific needs.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.