Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
GeneralRe: Thread synchronization problem Pin
samzcs12-Sep-18 8:12
samzcs12-Sep-18 8:12 
GeneralRe: Thread synchronization problem Pin
leon de boer12-Sep-18 18:31
leon de boer12-Sep-18 18:31 
GeneralRe: Thread synchronization problem Pin
11917640 Member 12-Sep-18 18:58
11917640 Member 12-Sep-18 18:58 
If your system behaves as you describe, this is not synchronization problem. Task A and B are actually not tasks, these are synchronous functions. No parallel execution, every function has exclusive access to all variables (resources). Specifically, in your last code fragment:
rcvd = true;
if((rcvd == false)
{
    // this code is never executed
    receivenotify(chid, rcv_buffer, sizeof(rcv_buffer), dataCB,0);
}

AnswerRe: Thread synchronization problem Pin
«_Superman_»23-Sep-18 22:26
professional«_Superman_»23-Sep-18 22:26 
QuestionBreak when address reading Pin
Member 130813699-Sep-18 15:47
Member 130813699-Sep-18 15:47 
AnswerRe: Break when address reading Pin
Victor Nijegorodov10-Sep-18 2:04
Victor Nijegorodov10-Sep-18 2:04 
GeneralRe: Break when address reading Pin
Member 1308136910-Sep-18 15:45
Member 1308136910-Sep-18 15:45 
AnswerRe: Break when address reading Pin
leon de boer10-Sep-18 2:12
leon de boer10-Sep-18 2:12 
GeneralRe: Break when address reading Pin
Member 1308136910-Sep-18 15:49
Member 1308136910-Sep-18 15:49 
AnswerRe: Break when address reading Pin
Richard Andrew x6410-Sep-18 8:17
professionalRichard Andrew x6410-Sep-18 8:17 
GeneralRe: Break when address reading Pin
Member 1308136910-Sep-18 15:50
Member 1308136910-Sep-18 15:50 
AnswerRe: Break when address reading Pin
«_Superman_»23-Sep-18 22:30
professional«_Superman_»23-Sep-18 22:30 

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.