08-30-2008, 11:00 AM
Function WaitForThreads
;/
function $thread1 [$thread2] [$thread3] [$thread4] [$thread5] [$thread6] [$thread7] [$thread8] [$thread9] [$thread10]
;Waits until all specified threads will end.
;EXAMPLE
;mac "Function64"
;mac "Function67"
;WaitForThreads "Function64" "Function67"
0.1
opt waitmsg -1
int i nt(getopt(nargs))
lpstr* t=&thread1
QMTHREAD q
rep
,for(i 0 nt) if(EnumQmThreads(&q 1 0 t[i])) break
,if(i=nt) break
,wait 0 H q.threadhandle