mrjt Messages: 705 Registered: March 2007 Location: London
Contributor
For one thing you aren't actually checking for stop in thrPerso.
The more fundamental problem is that calling Wait on a thread with GuiLock on it from the Gui thread won't work. The Gui thread is waiting for the thread to finish while the thread is waiting for the GUI thread to finish (or go idle). Therefor you get a lock.
I would suggest running a timer callback that checks for thread completion or something.