Page 2 of 2

Re: Problem Exporting Beast To wxWidgets

Posted: Wed Feb 07, 2018 12:59 am
by Everydaydiesel
Thank you so much for helping me. It is working now.

Re: Problem Exporting Beast To wxWidgets

Posted: Wed Feb 07, 2018 6:59 am
by PB
doublemax wrote:Beware that you're allowed to use GUI elements from inside secondary threads in wxWidgets.


Just for the information, I believe that doublemax made a typo here and the sentence should read "Beware that you're NOT allowed to use GUI elements from inside secondary threads in wxWidgets"

Re: Problem Exporting Beast To wxWidgets

Posted: Wed Feb 07, 2018 3:54 pm
by doublemax
Indeed, thanks :oops:

Re: Problem Exporting Beast To wxWidgets

Posted: Sat Feb 10, 2018 9:27 pm
by Everydaydiesel
Thanks to everyone for helping. I really do appreciate it.

How do I kill the thread when the main window closes. Right now I spin that thread off, then it hangs (waiting for a http response). I would like that thread to end when the window closes.

Re: Problem Exporting Beast To wxWidgets

Posted: Sat Feb 10, 2018 9:42 pm
by New Pagodi
Everydaydiesel wrote:Thanks to everyone for helping. I really do appreciate it.

How do I kill the thread when the main window closes. Right now I spin that thread off, then it hangs (waiting for a http response). I would like that thread to end when the window closes.


The thread sample shows one way to do this. The approach used there is to have a bool variable in the app class indicate that the application is shutting down. The threads then check that variable periodically to see if they should terminate.

Also, a semaphore is used in the destructor for the main form to keep it from being destroyed until all threads are terminated.