|
Synopsis
|
Parameters
Parameter |
Meaning |
threadId |
ID number of the thread to be waited for. |
Return value
0, in the event of errors -1. |
Errors
Missing/incorrect argument, for example, the specified thread does not exist. |
Description
Waits for the thread with the identification number threadId. Note It is only possible to wait for scripts, which have been started in the own script and it is not possible to wait for one's own thread: waitThread(getThreadId()). |
Example |
void
myFunction() A) with waitThread() -> main() is waiting after startThread() as long as the thread does not finish */ WCCOAui1:2010.11.24 16:28:18.128["begin
of main"] */ B) without waitThread() -> main() will finish immediately after startThread() call */ WCCOAui1:2010.11.24 16:29:54.881["begin
of main"] */ |
Relates to
Threads |
Availability
UI, CTRL, DP |
See also
V 3.11 SP1
Copyright ETM professional control GmbH 2013 All Rights Reserved