Click here to Skip to main content
15,941,690 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SetupComm Pin
Randor 2-Apr-08 8:26
professional Randor 2-Apr-08 8:26 
GeneralRe: SetupComm Pin
RomTibi2-Apr-08 10:01
RomTibi2-Apr-08 10:01 
QuestionNumber of waiting threads Pin
LionAM2-Apr-08 5:37
LionAM2-Apr-08 5:37 
GeneralRe: Number of waiting threads Pin
Eytukan2-Apr-08 5:53
Eytukan2-Apr-08 5:53 
GeneralRe: Number of waiting threads Pin
LionAM2-Apr-08 6:20
LionAM2-Apr-08 6:20 
GeneralRe: Number of waiting threads Pin
Mark Salsbery2-Apr-08 6:38
Mark Salsbery2-Apr-08 6:38 
GeneralRe: Number of waiting threads Pin
LionAM2-Apr-08 10:42
LionAM2-Apr-08 10:42 
GeneralRe: Number of waiting threads Pin
Mark Salsbery2-Apr-08 13:34
Mark Salsbery2-Apr-08 13:34 
The lack of an atomic lock/counter-adjust API makes it tricky.

There's a ton of solutions on the web (e.g. search "reader writer lock") that vary in performance and whether
they favor the reader thread(s) or the writer thread(s).

Even if you're looking to design your own, they're worth looking at IMO.

Here's an interesting article:  Implementing a Reader-Writer lock[^]
  along with its companion article:  Analysis of Reader-Writer lock[^]

Here's a simple example - straight forward, if performance isn't a major concern: Reader/Writer Lock[^]

Hope that helps a bit,
Mark


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Number of waiting threads Pin
LionAM4-Apr-08 2:55
LionAM4-Apr-08 2:55 
GeneralRe: Number of waiting threads Pin
Mark Salsbery4-Apr-08 6:49
Mark Salsbery4-Apr-08 6:49 
GeneralRe: Number of waiting threads Pin
Mark Salsbery2-Apr-08 6:01
Mark Salsbery2-Apr-08 6:01 
GeneralMenu item is displyed as "@xyz@"... Pin
ptr_Electron2-Apr-08 5:05
ptr_Electron2-Apr-08 5:05 
GeneralRe: Menu item is displyed as "@xyz@"... Pin
led mike2-Apr-08 5:11
led mike2-Apr-08 5:11 
GeneralRe: Menu item is displyed as "@xyz@"... Pin
ptr_Electron2-Apr-08 5:39
ptr_Electron2-Apr-08 5:39 
GeneralRe: Menu item is displyed as "@xyz@"... Pin
Hamid_RT7-Apr-08 4:08
Hamid_RT7-Apr-08 4:08 
Questionreg., CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG Pin
ganesa moorthy2-Apr-08 4:50
ganesa moorthy2-Apr-08 4:50 
GeneralRe: reg., CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG Pin
Mark Salsbery2-Apr-08 6:08
Mark Salsbery2-Apr-08 6:08 
GeneralRe: reg., CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG Pin
ganesa moorthy3-Apr-08 19:36
ganesa moorthy3-Apr-08 19:36 
GeneralRe: reg., CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG Pin
Mark Salsbery4-Apr-08 6:04
Mark Salsbery4-Apr-08 6:04 
GeneralRe: reg., CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG Pin
Hamid_RT7-Apr-08 4:07
Hamid_RT7-Apr-08 4:07 
QuestionMixed metaphor problem Pin
Matthew Faithfull2-Apr-08 4:22
Matthew Faithfull2-Apr-08 4:22 
GeneralRe: Mixed metaphor problem Pin
Nemanja Trifunovic2-Apr-08 4:42
Nemanja Trifunovic2-Apr-08 4:42 
GeneralRe: Mixed metaphor problem [modified] Pin
Matthew Faithfull2-Apr-08 4:50
Matthew Faithfull2-Apr-08 4:50 
GeneralRe: Mixed metaphor problem Pin
CPallini2-Apr-08 4:50
mveCPallini2-Apr-08 4:50 
GeneralRe: Mixed metaphor problem Pin
Matthew Faithfull2-Apr-08 5:06
Matthew Faithfull2-Apr-08 5:06 

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.