waitThread
|
|
ID1, ID2,
|
|
Positive integers specifying the IDs of the threads that must end in order for the function to return.
|
|
|
ERR_OK
|
|
The flag set if successful.
|
|
ERR_FAILED
|
|
The flag set if failed.
|
|
|
This set of statements continuously captures an image and performs its processing in three parallel threads. The waitThread function at the end of the loop waits for two additional threads to complete, preventing the script from starting a new cycle before the processing is finished.
|
|
do
|
grabim(0)
|
emphasize(0,1,10)
|
'next two functions are executed in
|
'separate threads
|
a=thread("Emboss(0,3,1)")
|
b=thread("Sobel(0,2,0)")
|
'wait for both threads to complete
|
waitThread(a,b)
|
loop
|