Click here to Skip to main content
15,894,180 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Definitive singleton implementation Pin
Ryan Binns24-May-06 14:02
Ryan Binns24-May-06 14:02 
QuestionUI Thread to control CAsyncSocket [modified] Pin
SPowers24-May-06 8:56
SPowers24-May-06 8:56 
AnswerRe: UI Thread to control CAsyncSocket [modified] Pin
David Crow24-May-06 10:30
David Crow24-May-06 10:30 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
SPowers24-May-06 10:35
SPowers24-May-06 10:35 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
David Crow24-May-06 10:52
David Crow24-May-06 10:52 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
SPowers24-May-06 10:56
SPowers24-May-06 10:56 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
David Crow24-May-06 10:58
David Crow24-May-06 10:58 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
SPowers24-May-06 11:11
SPowers24-May-06 11:11 
Ok that makes sense....

So I should plan it like this:

Databuffers:
buffer A: w/mutex
holds image data for frame X
buffer B: w/mutex
holds image data for frame y

x & y are concurrent image frames

Thread 1: main prgrm (reading and displaying data from buffer)
will hold pointers to buffer A & B

Thread 2: Socket exists on this thread and will handle sending and receiving data from socket as well as writing data to the data buffers
will hold pointers to buffer A & B

I'll have to put a mutex on the shared buffers so that they dont access it concurrently. And the mutex permissions will switch between the two buffers so that Thread2 can write constantly and Thread1 can read constantly.


Sound like a plan or did I miss the whole point completely?
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
SPowers24-May-06 11:17
SPowers24-May-06 11:17 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
Ryan Binns24-May-06 14:03
Ryan Binns24-May-06 14:03 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
SPowers25-May-06 3:03
SPowers25-May-06 3:03 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
Ryan Binns25-May-06 3:32
Ryan Binns25-May-06 3:32 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
SPowers25-May-06 7:36
SPowers25-May-06 7:36 
GeneralRe: UI Thread to control CAsyncSocket [modified] Pin
Ryan Binns25-May-06 13:18
Ryan Binns25-May-06 13:18 
QuestionUser Defined Messages - Value [modified] Pin
Cliff Hatch24-May-06 8:42
Cliff Hatch24-May-06 8:42 
AnswerRe: User Defined Messages - Value [modified] Pin
David Crow24-May-06 10:24
David Crow24-May-06 10:24 
GeneralRe: User Defined Messages - Value [modified] Pin
PJ Arends24-May-06 10:50
professionalPJ Arends24-May-06 10:50 
GeneralRe: User Defined Messages - Value [modified] Pin
David Crow24-May-06 10:57
David Crow24-May-06 10:57 
GeneralRe: User Defined Messages - Value [modified] Pin
Cliff Hatch24-May-06 11:38
Cliff Hatch24-May-06 11:38 
AnswerRe: User Defined Messages - Value Pin
Michael Dunn24-May-06 12:25
sitebuilderMichael Dunn24-May-06 12:25 
GeneralRe: User Defined Messages - Value Pin
Cliff Hatch25-May-06 0:52
Cliff Hatch25-May-06 0:52 
QuestionPostMessage - What should the handler return? Pin
Cliff Hatch24-May-06 8:39
Cliff Hatch24-May-06 8:39 
AnswerRe: PostMessage - What should the handler return? Pin
RChin24-May-06 9:48
RChin24-May-06 9:48 
GeneralRe: PostMessage - What should the handler return? Pin
Cliff Hatch24-May-06 11:18
Cliff Hatch24-May-06 11:18 
QuestionCorrect use of extern Pin
masnu24-May-06 8:38
masnu24-May-06 8:38 

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.