G
Guest
Hi there.Im building a multithreaded application which uses forms and im
having some problems possibly due to my inexperience.
The project is being developed in C# with visual studio 2005.
I have a main thread which executes Application.Run() (so it has the message
loop for the interface) and later i create more threads that are executing
and in some situations have to do some operations in the UI. Some threads
also query the UI the creation of non-modal dialogs to show information "on
the fly". There arent cross-threaded operations in the UI, im sure of that.
All the operations have been queried using the InvokeRequired attribute and
the Invoke Method (i have used only the Invoke method instead of using
BeginInvoke too) so all the operations on the UI are done in the Thread tha
run Application.Run (the UI thread).
When i execute my application everything goes fine buty sometimes when i
execute it and push some button of one of the windows or when i close one of
that windows etc etc my application hangs (well i dont know if my application
but at least the UI). I think that the problem is in that im not considering
some issue of the using of the UI in multithreading applications, maybe it
is taking place a deadlock when im quering the UI tread some operations from
different threads ¿someone can advise me or has any idea about what can be
happening? thanks
having some problems possibly due to my inexperience.
The project is being developed in C# with visual studio 2005.
I have a main thread which executes Application.Run() (so it has the message
loop for the interface) and later i create more threads that are executing
and in some situations have to do some operations in the UI. Some threads
also query the UI the creation of non-modal dialogs to show information "on
the fly". There arent cross-threaded operations in the UI, im sure of that.
All the operations have been queried using the InvokeRequired attribute and
the Invoke Method (i have used only the Invoke method instead of using
BeginInvoke too) so all the operations on the UI are done in the Thread tha
run Application.Run (the UI thread).
When i execute my application everything goes fine buty sometimes when i
execute it and push some button of one of the windows or when i close one of
that windows etc etc my application hangs (well i dont know if my application
but at least the UI). I think that the problem is in that im not considering
some issue of the using of the UI in multithreading applications, maybe it
is taking place a deadlock when im quering the UI tread some operations from
different threads ¿someone can advise me or has any idea about what can be
happening? thanks