Click here to Skip to main content
15,891,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: launch a word processor(MS Word) in an MS Visual C++ dialog based application Pin
Victor Nijegorodov16-Sep-18 20:25
Victor Nijegorodov16-Sep-18 20:25 
AnswerRe: launch a word processor(MS Word) in an MS Visual C++ dialog based application Pin
_Flaviu14-Sep-18 0:42
_Flaviu14-Sep-18 0:42 
GeneralRe: launch a word processor(MS Word) in an MS Visual C++ dialog based application Pin
zigie16-Sep-18 18:04
zigie16-Sep-18 18:04 
QuestionRe: launch a word processor(MS Word) in an MS Visual C++ dialog based application Pin
David Crow14-Sep-18 3:01
David Crow14-Sep-18 3:01 
AnswerRe: launch a word processor(MS Word) in an MS Visual C++ dialog based application Pin
zigie16-Sep-18 18:14
zigie16-Sep-18 18:14 
QuestionThe mismatch between Print preview and the real printing Pin
Member 1388734912-Sep-18 0:47
Member 1388734912-Sep-18 0:47 
AnswerRe: The mismatch between Print preview and the real printing Pin
Richard MacCutchan12-Sep-18 0:57
mveRichard MacCutchan12-Sep-18 0:57 
GeneralRe: The mismatch between Print preview and the real printing Pin
Member 1388734912-Sep-18 2:03
Member 1388734912-Sep-18 2:03 
GeneralRe: The mismatch between Print preview and the real printing Pin
leon de boer12-Sep-18 7:05
leon de boer12-Sep-18 7:05 
GeneralRe: The mismatch between Print preview and the real printing Pin
Member 1388734912-Sep-18 21:07
Member 1388734912-Sep-18 21:07 
GeneralRe: The mismatch between Print preview and the real printing Pin
leon de boer13-Sep-18 0:47
leon de boer13-Sep-18 0:47 
GeneralRe: The mismatch between Print preview and the real printing Pin
Member 1388734913-Sep-18 3:18
Member 1388734913-Sep-18 3:18 
GeneralRe: The mismatch between Print preview and the real printing Pin
leon de boer13-Sep-18 5:29
leon de boer13-Sep-18 5:29 
QuestionThread synchronization problem Pin
samzcs10-Sep-18 9:12
samzcs10-Sep-18 9:12 
Hi, I met a thread synchronization scenario in a small code.
//task A: 
if (rcvd == true)  
{
  read rcv_buffer
   ...
  rcvd = false;
}

//task B:
dataCB(int ch_id, char *buf, int len, char stat)
{
  rcvd = true;
  receivenotify(chid, rcv_buffer, sizeof(rcv_buffer), dataCB,0);
}


here, rcvd = false in task A, can't stop task B produce data. how can I let task A, B synchronized.
add if (rcvd == false) in task B before receivenotify()? is that a dead lock ?

Thanks
AnswerRe: Thread synchronization problem Pin
Richard Andrew x6410-Sep-18 9:35
professionalRichard Andrew x6410-Sep-18 9:35 
GeneralRe: Thread synchronization problem Pin
samzcs10-Sep-18 10:09
samzcs10-Sep-18 10:09 
GeneralRe: Thread synchronization problem Pin
Richard Andrew x6410-Sep-18 10:11
professionalRichard Andrew x6410-Sep-18 10:11 
GeneralRe: Thread synchronization problem Pin
samzcs10-Sep-18 10:28
samzcs10-Sep-18 10:28 
QuestionRe: Thread synchronization problem Pin
CPallini10-Sep-18 21:02
mveCPallini10-Sep-18 21:02 
AnswerRe: Thread synchronization problem Pin
samzcs11-Sep-18 2:45
samzcs11-Sep-18 2:45 
GeneralRe: Thread synchronization problem Pin
CPallini11-Sep-18 3:23
mveCPallini11-Sep-18 3:23 
AnswerRe: Thread synchronization problem Pin
leon de boer10-Sep-18 22:08
leon de boer10-Sep-18 22:08 
GeneralRe: Thread synchronization problem Pin
samzcs11-Sep-18 2:50
samzcs11-Sep-18 2:50 
GeneralRe: Thread synchronization problem Pin
leon de boer11-Sep-18 5:05
leon de boer11-Sep-18 5:05 
GeneralRe: Thread synchronization problem Pin
11917640 Member 11-Sep-18 19:53
11917640 Member 11-Sep-18 19:53 

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.