Click here to Skip to main content
15,920,956 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WriteFile API Pin
Ryan Binns25-Nov-04 17:17
Ryan Binns25-Nov-04 17:17 
GeneralRe: WriteFile API Pin
Archer28225-Nov-04 19:17
Archer28225-Nov-04 19:17 
GeneralRe: WriteFile API Pin
Ryan Binns25-Nov-04 19:35
Ryan Binns25-Nov-04 19:35 
GeneralThreads synchronization problem Pin
lisoft25-Nov-04 14:26
lisoft25-Nov-04 14:26 
GeneralRe: Threads synchronization problem Pin
PJ Arends25-Nov-04 15:37
professionalPJ Arends25-Nov-04 15:37 
GeneralRe: Threads synchronization problem Pin
John M. Drescher25-Nov-04 15:41
John M. Drescher25-Nov-04 15:41 
GeneralRe: Threads synchronization problem Pin
lisoft25-Nov-04 17:31
lisoft25-Nov-04 17:31 
GeneralRe: Threads synchronization problem Pin
John R. Shaw25-Nov-04 18:59
John R. Shaw25-Nov-04 18:59 
If I remember right the lock function does not return until it has managed to lock. So checking it is lock after call lock is redundant. The purpose of locking is to allow a thread to manipulate the data with messing up another threads actions. In other words only one thread can read or modify the data at a given time. You do not want to try to copy a string while anouther thread is modifying that same string.

So the answer is YES! Before thread two can work with the data thread one has to stop working with it. Before thead one can work with the data thread two has to stop working with it. The individual threads do not have to stop they just have to stop accessing the shared data long enough for anouther thread to access it.


INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: Threads synchronization problem Pin
Robert Bielik25-Nov-04 20:20
Robert Bielik25-Nov-04 20:20 
GeneralBreakpoints stopped breaking... Pin
herbert_chow25-Nov-04 13:48
herbert_chow25-Nov-04 13:48 
GeneralRe: Breakpoints stopped breaking... Pin
John R. Shaw25-Nov-04 18:44
John R. Shaw25-Nov-04 18:44 
GeneralRe: Breakpoints stopped breaking... Pin
herbert_chow26-Nov-04 7:37
herbert_chow26-Nov-04 7:37 
GeneralUsing VC++ DLLs as webservices Pin
CCSst25-Nov-04 13:26
CCSst25-Nov-04 13:26 
Question8 byte long integer? how? Pin
Kuniva25-Nov-04 10:27
Kuniva25-Nov-04 10:27 
AnswerRe: 8 byte long integer? how? Pin
Joaquín M López Muñoz25-Nov-04 11:35
Joaquín M López Muñoz25-Nov-04 11:35 
GeneralShortes Path Pin
slacker2125-Nov-04 9:59
slacker2125-Nov-04 9:59 
Questionhow LCD drive for C++?? Pin
conalmic25-Nov-04 8:48
conalmic25-Nov-04 8:48 
AnswerRe: how LCD drive for C++?? Pin
Maximilien25-Nov-04 9:17
Maximilien25-Nov-04 9:17 
AnswerRe: how LCD drive for C++?? Pin
John R. Shaw25-Nov-04 9:18
John R. Shaw25-Nov-04 9:18 
GeneralGetFileSize Pin
Fernando A. Gomez F.25-Nov-04 7:57
Fernando A. Gomez F.25-Nov-04 7:57 
GeneralRe: GetFileSize Pin
Joaquín M López Muñoz25-Nov-04 8:11
Joaquín M López Muñoz25-Nov-04 8:11 
GeneralRe: GetFileSize Pin
Archer28225-Nov-04 17:32
Archer28225-Nov-04 17:32 
GeneralSome help for Loop's Pin
faroqtam25-Nov-04 7:56
faroqtam25-Nov-04 7:56 
GeneralRe: Some help for Loop's Pin
John R. Shaw25-Nov-04 9:11
John R. Shaw25-Nov-04 9:11 
GeneralRe: Some help for Loop's Pin
Maximilien25-Nov-04 9:26
Maximilien25-Nov-04 9:26 

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.