G
Guest
Hi, i have a multithreaded application which uses forms and i have a worker
thread that has to create a modeless dialog to monitor some of the operation
which it has to do. The problem is that if you create the dialog and call
show() from the thread this dialog wont't have a message queue and will
become unresponsive. I found in a page that you have to create the dialog in
the main UI thread.In that case the message queue of the main form will be
shared among the main form of my application and the modeless dialog i have
created, but there is a problem. If one of them hangs up the other too will
hang. The problem is that my application hangs at one point and i dont know
exactly the reason , the only thing i know is that it has to be something
like a deadlock that causes one of the forms become unresponsive.
I want the modeless dialog to have its own message queue independent from
the main UI message queue, ¿how i can do that? i have tried to create a new
thread which executes application.run again as i have read that this method
creates a message queue for the thread who calls it but the result was not
the expected one: my modeless dialog runs ,be sure of it but when i call
application exit in the thread of the modeless dialog all the application
exit, not only the thread which i was pretending to be th ethread of teh
dialog, follow me?
Any ideas about this?
thread that has to create a modeless dialog to monitor some of the operation
which it has to do. The problem is that if you create the dialog and call
show() from the thread this dialog wont't have a message queue and will
become unresponsive. I found in a page that you have to create the dialog in
the main UI thread.In that case the message queue of the main form will be
shared among the main form of my application and the modeless dialog i have
created, but there is a problem. If one of them hangs up the other too will
hang. The problem is that my application hangs at one point and i dont know
exactly the reason , the only thing i know is that it has to be something
like a deadlock that causes one of the forms become unresponsive.
I want the modeless dialog to have its own message queue independent from
the main UI message queue, ¿how i can do that? i have tried to create a new
thread which executes application.run again as i have read that this method
creates a message queue for the thread who calls it but the result was not
the expected one: my modeless dialog runs ,be sure of it but when i call
application exit in the thread of the modeless dialog all the application
exit, not only the thread which i was pretending to be th ethread of teh
dialog, follow me?
Any ideas about this?