Simplest way to get wxWidgets to crash when using multiple threads
Simplest way to get wxWidgets to crash when using multiple threads
I want to be able to achieve the title in the shortest number of lines of code possible and with the simplest GUI possible. I've tried changing labels and setting button enablement from a worker thread but with no crash. Maybe it isn't possible to guarantee a crash but code with a high likelihood of crashing would also be acceptable.
Re: Simplest way to get wxWidgets to crash when using multiple threads
Are you trying to research if it's worth taking the risk to ignore all warnings about this and just do it?
Problems caused by multithreading come when you least expect them and even is some GUI operation may work now, sooner or later it will bite you in the behind.
The platform plays a big role too. AFAIK Windows is more forgiving, GTK crashes much faster if you do a GUI operation from a worker thread.
Problems caused by multithreading come when you least expect them and even is some GUI operation may work now, sooner or later it will bite you in the behind.
The platform plays a big role too. AFAIK Windows is more forgiving, GTK crashes much faster if you do a GUI operation from a worker thread.
Use the source, Luke!
Re: Simplest way to get wxWidgets to crash when using multiple threads
Putting together a "Bad Code" example for interview question.