Multitasking Doubt
Publicado: Jue Sep 18, 2014 5:30 pm
Hello Xailers,
I have a doubt about multitasking, how do I Stop and start a thread within the same code block?
eg.:
The thread is already running and I click the following button to stop and start it again;
METHOD ResetClick()
::oThread1:Stop()
IF ::oThread1:nStatus == 0 //nstatus always returns -1, :Quit() produces the same return
::oThread1:Run( @function() ) //if I set this outside the "IF", the program freezes
ENDIF
RETURN NIL
Thanks,
Juliano
I have a doubt about multitasking, how do I Stop and start a thread within the same code block?
eg.:
The thread is already running and I click the following button to stop and start it again;
METHOD ResetClick()
::oThread1:Stop()
IF ::oThread1:nStatus == 0 //nstatus always returns -1, :Quit() produces the same return
::oThread1:Run( @function() ) //if I set this outside the "IF", the program freezes
ENDIF
RETURN NIL
Thanks,
Juliano