Re: SendMessage (in secondary thread) freezes application GUI thre
- From: "Michael J. Salamone" <mikesa#at#entrek#dot#com>
- Date: Fri, 17 Nov 2006 06:37:09 -0800
Did you try the suggestion I made earlier?
Does the UI thread ever do a Wait (or other blocking call)? Any
chance it doesn't come out of that wait (i.e. what circumstances
would cause it to wait forever)?
You could try setting a flag just before waiting and then clearing
after the
wait. Then, in the non-UI thread, check the flag. If the flag is
set,
throw up a MessageBox. Then attach the debugger to the program and
get some stack traces.
--
Michael Salamone [eMVP]
Entrek Software, Inc.
www.entrek.com
"skyapie" <skyapie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:23E99DE6-7FDA-4A69-9EE4-808D48D4C3D5@xxxxxxxxxxxxxxxx
Thanks for that Paul.
Now I just got to figure out which message getting processed is the one
causing the deadlock.... (any clues as to how to do this?)
Thanks :)
"Paul G. Tobey [eMVP]" wrote:
One or the other will win and that message will end up in the queue
first,
will, presumably, be handled first by the third thread, and that
application
will be released first. Then the next message will be at the top of the
queue and, again, the third thread will process that.
What's the question? If the system is about to go into suspend mode, it
will probably suspend before the about-to-suspend message gets to the UI
thread. When the device resumes, that message will still be there...
Paul T.
"skyapie" <skyapie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BB5466B6-F02A-4F1E-9285-9B230BFD58F7@xxxxxxxxxxxxxxxx
Hi guys, me again... =)
I have a question... what happens if there are 3 threads, and 2 threads
simultaneously do a "SendMessage" to the third one?
Plus, what if Thread A is actually sending a message to the UI thread,
saying that it has received a Power Broadcast message, and that the
system
was about to go into suspend mode... and the UI thread was in the
middle
of
processing Thread B's message?
Thanks...
.
- Follow-Ups:
- References:
- Re: SendMessage (in secondary thread) freezes application GUI thread?
- From: Paul G. Tobey [eMVP]
- Re: SendMessage (in secondary thread) freezes application GUI thre
- From: skyapie
- Re: SendMessage (in secondary thread) freezes application GUI thre
- From: Paul G. Tobey [eMVP]
- Re: SendMessage (in secondary thread) freezes application GUI thre
- From: Michael J. Salamone
- Re: SendMessage (in secondary thread) freezes application GUI thre
- From: skyapie
- Re: SendMessage (in secondary thread) freezes application GUI thre
- From: Paul G. Tobey [eMVP]
- Re: SendMessage (in secondary thread) freezes application GUI thre
- From: skyapie
- Re: SendMessage (in secondary thread) freezes application GUI thread?
- Prev by Date: C# - C interop
- Next by Date: Re: C# - C interop
- Previous by thread: Re: SendMessage (in secondary thread) freezes application GUI thre
- Next by thread: Re: SendMessage (in secondary thread) freezes application GUI thre
- Index(es):
Relevant Pages
|