Click here to Skip to main content
15,906,569 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading strings from ID3 tag Pin
Code-o-mat15-Oct-10 9:46
Code-o-mat15-Oct-10 9:46 
GeneralRe: Reading strings from ID3 tag Pin
Danzy8315-Oct-10 11:25
Danzy8315-Oct-10 11:25 
GeneralRe: Reading strings from ID3 tag Pin
Code-o-mat15-Oct-10 11:39
Code-o-mat15-Oct-10 11:39 
QuestionType Casting Pin
gothic_coder15-Oct-10 1:00
gothic_coder15-Oct-10 1:00 
AnswerRe: Type Casting Pin
Cedric Moonen15-Oct-10 1:02
Cedric Moonen15-Oct-10 1:02 
GeneralRe: Type Casting Pin
gothic_coder15-Oct-10 1:06
gothic_coder15-Oct-10 1:06 
AnswerRe: Type Casting Pin
Sauro Viti15-Oct-10 1:15
professionalSauro Viti15-Oct-10 1:15 
QuestionOne genneral question on dual buffers design with multi-threading Pin
SAMZC14-Oct-10 23:42
SAMZC14-Oct-10 23:42 
Intend to capture data from network with huge volume. I intend to use multi-treading tech to do it.
1. producer:capture thread for data capturing. capture data in one loop and put incoming data into buffer
2. consumer:worker thread.get data from the producer and do more data processing.

here the producer shares buffers with consumers.I want to use 2 buffers to get a high performance. and the two buffers works in ping-pang mode like this ...

// the two buffers for sharing data
BUFFER bufferA;
BUFFER bufferB;
one scenario is ...producer put data into bufferA and the consumer read data from bufferB.
the producer use the buffer in procedure ...
write data...
bufferA---bufferB----bufferA----bufferB.... in ping-pang mode.
the consumer use the buffer in procedure....
read data...
bufferB---bufferA---bufferB---bufferA.....in ping-pang mode.

of course, the synchronizition is the biggest problem here. That's my question too.
How to implement the synchronization by using CRITICAL_SECTION/EVENT or other kernal objects to get a highest performance?

Appreciated for you any input here ...

Sam/BR.
The world is fine.

AnswerRe: One genneral question on dual buffers design with multi-threading Pin
CPallini14-Oct-10 23:49
mveCPallini14-Oct-10 23:49 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
Rajesh R Subramanian15-Oct-10 1:01
professionalRajesh R Subramanian15-Oct-10 1:01 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
CPallini15-Oct-10 2:35
mveCPallini15-Oct-10 2:35 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
Rajesh R Subramanian15-Oct-10 22:10
professionalRajesh R Subramanian15-Oct-10 22:10 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC15-Oct-10 23:42
SAMZC15-Oct-10 23:42 
AnswerRe: One genneral question on dual buffers design with multi-threading Pin
Cedric Moonen14-Oct-10 23:55
Cedric Moonen14-Oct-10 23:55 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC15-Oct-10 20:37
SAMZC15-Oct-10 20:37 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
Rick York18-Oct-10 7:11
mveRick York18-Oct-10 7:11 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC18-Oct-10 18:22
SAMZC18-Oct-10 18:22 
AnswerRe: One genneral question on dual buffers design with multi-threading Pin
Rajesh R Subramanian15-Oct-10 1:05
professionalRajesh R Subramanian15-Oct-10 1:05 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC15-Oct-10 20:53
SAMZC15-Oct-10 20:53 
AnswerRe: One genneral question on dual buffers design with multi-threading Pin
federico.strati15-Oct-10 1:40
federico.strati15-Oct-10 1:40 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC15-Oct-10 20:51
SAMZC15-Oct-10 20:51 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZCN15-Oct-10 23:31
SAMZCN15-Oct-10 23:31 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
federico.strati17-Oct-10 20:45
federico.strati17-Oct-10 20:45 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC16-Oct-10 7:57
SAMZC16-Oct-10 7:57 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
federico.strati17-Oct-10 20:50
federico.strati17-Oct-10 20:50 

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.