endThread
Top  Previous  Next

endThread ( integer ID1 [,integer ID2,… ] )

Use this function to terminate the execution of one or several processing threads.

Parameters
 
ID1, ID2, …  
 
Positive integers specifying the IDs of the threads to be terminated.  
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example
 
This set of statements starts a capture cycle in a separate thread and terminates its in 5 seconds:  
 
a=thread("do\ngrabim(1)\nloop")  
wait(5000)  
endThread(a)