Hi all, Im running a thread in a plugin im making, i want this thread to keep running even when the user switches to another screen. But i also want the thread to be terminated when the user Exits Media Portal.
Right now its working perfectly, but when i exit media portal i still have a thread under "Media Portal" in the running processes under CTRL+ALT+DEL.
I declared the thread as follows:
commands handler is a funciton that contains an infinite loop.
So basicly my question is, where do i put the statement:
Since i want the thread to keep running even when the user switches to another screen, i assume that i cannot abort the thread in the:
thanks :-D
Right now its working perfectly, but when i exit media portal i still have a thread under "Media Portal" in the running processes under CTRL+ALT+DEL.
I declared the thread as follows:
Code:
ListeningProgram = new Thread(commandsHandler);
ListeningProgram.Start();
So basicly my question is, where do i put the statement:
Code:
ListeningProgram.Abort();
Since i want the thread to keep running even when the user switches to another screen, i assume that i cannot abort the thread in the:
Code:
virtual void OnPageDestroy(int newWindowId)
thanks :-D