Click here to Skip to main content
11,438,069 members (47,874 online)

C / C++ / MFC

 
AnswerRe: Help with threads [modified] Pin
pasztorpisti4-Sep-12 15:18
memberpasztorpisti4-Sep-12 15:18 
GeneralRe: Help with threads Pin
Joe Woodbury4-Sep-12 18:16
memberJoe Woodbury4-Sep-12 18:16 
GeneralRe: Help with threads Pin
pasztorpisti4-Sep-12 23:33
memberpasztorpisti4-Sep-12 23:33 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 13:23
memberAlbert Holguin5-Sep-12 13:23 
GeneralRe: Help with threads Pin
Richard MacCutchan4-Sep-12 23:06
mvpRichard MacCutchan4-Sep-12 23:06 
QuestionRe: Help with threads Pin
DavidCrow5-Sep-12 4:15
memberDavidCrow5-Sep-12 4:15 
AnswerRe: Help with threads Pin
pasztorpisti5-Sep-12 4:31
memberpasztorpisti5-Sep-12 4:31 
GeneralRe: Help with threads Pin
DavidCrow5-Sep-12 4:46
memberDavidCrow5-Sep-12 4: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 4:55
memberpasztorpisti5-Sep-12 4:55 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 13:26
memberAlbert Holguin5-Sep-12 13:26 
AnswerRe: Help with threads Pin
Chuck O'Toole5-Sep-12 4:57
memberChuck O'Toole5-Sep-12 4:57 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 13:25
memberAlbert Holguin5-Sep-12 13:25 
AnswerRe: Help with threads Pin
Chuck O'Toole6-Sep-12 16:46
memberChuck O'Toole6-Sep-12 16:46 
GeneralRe: Help with threads Pin
Albert Holguin7-Sep-12 4:54
memberAlbert Holguin7-Sep-12 4:54 
QuestionRe: Help with threads Pin
AndrewG12315-Sep-12 10:55
memberAndrewG12315-Sep-12 10:55 
AnswerRe: Help with threads Pin
DavidCrow6-Sep-12 6:41
memberDavidCrow6-Sep-12 6:41 
QuestionRe: Help with threads Pin
AndrewG123111-Sep-12 12:33
memberAndrewG123111-Sep-12 12:33 
QuestionRe: Help with threads Pin
DavidCrow12-Sep-12 3:45
memberDavidCrow12-Sep-12 3:45 
GeneralRe: Help with threads Pin
AndrewG123112-Sep-12 7:21
memberAndrewG123112-Sep-12 7:21 
SuggestionRe: Help with threads [modified] Pin
DavidCrow12-Sep-12 9:17
memberDavidCrow12-Sep-12 9:17 
QuestionRe: Help with threads Pin
AndrewG123112-Sep-12 15:21
memberAndrewG123112-Sep-12 15:21 
AnswerRe: Help with threads Pin
DavidCrow13-Sep-12 4:47
memberDavidCrow13-Sep-12 4:47 
GeneralRe: Help with threads [modified] Pin
AndrewG123113-Sep-12 8:46
memberAndrewG123113-Sep-12 8:46 
GeneralRe: Help with threads Pin
DavidCrow13-Sep-12 8:55
memberDavidCrow13-Sep-12 8:55 
GeneralRe: Help with threads Pin
AndrewG123113-Sep-12 9:54
memberAndrewG123113-Sep-12 9:54 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150506.1 | Last Updated 5 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid