Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help with threads Pin
pasztorpisti4-Sep-12 14:18
pasztorpisti4-Sep-12 14:18 
GeneralRe: Help with threads Pin
Joe Woodbury4-Sep-12 17:16
professionalJoe Woodbury4-Sep-12 17:16 
GeneralRe: Help with threads Pin
pasztorpisti4-Sep-12 22:33
pasztorpisti4-Sep-12 22:33 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 12:23
professionalAlbert Holguin5-Sep-12 12:23 
GeneralRe: Help with threads Pin
Richard MacCutchan4-Sep-12 22:06
mveRichard MacCutchan4-Sep-12 22:06 
QuestionRe: Help with threads Pin
David Crow5-Sep-12 3:15
David Crow5-Sep-12 3:15 
AnswerRe: Help with threads Pin
pasztorpisti5-Sep-12 3:31
pasztorpisti5-Sep-12 3:31 
GeneralRe: Help with threads Pin
David Crow5-Sep-12 3:46
David Crow5-Sep-12 3:46 
pasztorpisti wrote:
Then the worker thread is waiting until the message is processed on the gui thread.
I'm not talking about the primary thread being busy for a few nanoseconds. I'm talking about deadlock. For example, the secondary thread sends a "add item to the control" message (e.g., LB_ADDSTRING) to the primary thread, which is blocked waiting on the secondary thread to complete. Now the secondary thread cannot complete because it is no longer running (waiting on SendMessage() to return). This is the primary reason why SendMessage() should rarely, if ever, be used to communicate between primary and secondary threads.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


GeneralRe: Help with threads Pin
pasztorpisti5-Sep-12 3:55
pasztorpisti5-Sep-12 3:55 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 12:26
professionalAlbert Holguin5-Sep-12 12:26 
AnswerRe: Help with threads Pin
Chuck O'Toole5-Sep-12 3:57
Chuck O'Toole5-Sep-12 3:57 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 12:25
professionalAlbert Holguin5-Sep-12 12:25 
AnswerRe: Help with threads Pin
Chuck O'Toole6-Sep-12 15:46
Chuck O'Toole6-Sep-12 15:46 
GeneralRe: Help with threads Pin
Albert Holguin7-Sep-12 3:54
professionalAlbert Holguin7-Sep-12 3:54 
QuestionRe: Help with threads Pin
AndrewG12315-Sep-12 9:55
AndrewG12315-Sep-12 9:55 
AnswerRe: Help with threads Pin
David Crow6-Sep-12 5:41
David Crow6-Sep-12 5:41 
QuestionRe: Help with threads Pin
AndrewG123111-Sep-12 11:33
AndrewG123111-Sep-12 11:33 
QuestionRe: Help with threads Pin
David Crow12-Sep-12 2:45
David Crow12-Sep-12 2:45 
GeneralRe: Help with threads Pin
AndrewG123112-Sep-12 6:21
AndrewG123112-Sep-12 6:21 
SuggestionRe: Help with threads Pin
David Crow12-Sep-12 8:17
David Crow12-Sep-12 8:17 
QuestionRe: Help with threads Pin
AndrewG123112-Sep-12 14:21
AndrewG123112-Sep-12 14:21 
AnswerRe: Help with threads Pin
David Crow13-Sep-12 3:47
David Crow13-Sep-12 3:47 
GeneralRe: Help with threads Pin
AndrewG123113-Sep-12 7:46
AndrewG123113-Sep-12 7:46 
GeneralRe: Help with threads Pin
David Crow13-Sep-12 7:55
David Crow13-Sep-12 7:55 
GeneralRe: Help with threads Pin
AndrewG123113-Sep-12 8:54
AndrewG123113-Sep-12 8:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.