Home » U++ Library support » U++ MT-multithreading and servers » MT app hangs
Re: MT app hangs [message #24014 is a reply to message #24012] |
Thu, 17 December 2009 13:51 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi, Mirek, thank for your answer
Anyways, I don't see a simple solution to my problem, indeed.
As far as I can understand, I can't use Wait() from inside the button callback, or anyways can't wait for the thread to stop from inside a gui event handler, as the thread could try a GuiLock between the Wait() call and its termination.
Worse, the tread can (ad it's probably) waiting for a lock to become free when I'm inside a callback, so I can't communicate with it.
The example I posted is very simplified, but what I need is a thread that can react to a Gui or a timed event (stop = true, and that's ok...) AND to check that the thread received it (Wait(), and that's not ok).
Why does Gui need to be locked inside event handlers ?
Can I unlock it inside the handler just to wait my thread to finish ? Or there's a nicer solution ?
Ciao
Max
|
|
|
Goto Forum:
Current Time: Wed May 08 09:57:46 CEST 2024
Total time taken to generate the page: 0.01596 seconds
|