Click here to Skip to main content
15,915,611 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Vector Pin
Giles21-Jun-05 11:46
Giles21-Jun-05 11:46 
GeneralRe: Vector Pin
Christian Graus21-Jun-05 13:35
protectorChristian Graus21-Jun-05 13:35 
GeneralRe: Vector Pin
John R. Shaw21-Jun-05 14:30
John R. Shaw21-Jun-05 14:30 
GeneralVectors or CList Pin
Wheatbread21-Jun-05 10:39
Wheatbread21-Jun-05 10:39 
GeneralRe: Vectors or CList Pin
Chris Losinger21-Jun-05 10:58
professionalChris Losinger21-Jun-05 10:58 
GeneralRe: Vectors or CList Pin
Christian Graus21-Jun-05 13:36
protectorChristian Graus21-Jun-05 13:36 
Generalmulti threading Pin
Ann6621-Jun-05 10:12
sussAnn6621-Jun-05 10:12 
GeneralRe: multi threading Pin
Blake Miller21-Jun-05 11:11
Blake Miller21-Jun-05 11:11 
You have two threads. Can't each one wait on an Event set by the other?
The read thread waits to do work until the write thread sets an event. The write thread waits for the Read thread to set an event. Each one sets the even the other is waiting for at the end of its own processing, signaling it is safe for the other to take over. I would think they would flop back and forth as you desire. It should not deadlock, I don't think, because neither one is waiting on both of the events to be signaled. You could always put a timeout in one of the threads that should have higher priority, in the case they are both idle waiting for 'the other guy' to set the event.
It would also be ideal if the port could set an event or some signel to let you know data was available for reading. I would think your process is the one repsonsible for any writing that occurs.

GeneralRe: multi threading Pin
Ravi Bhavnani21-Jun-05 15:12
professionalRavi Bhavnani21-Jun-05 15:12 
GeneralRe: multi threading Pin
Blake Miller22-Jun-05 5:06
Blake Miller22-Jun-05 5:06 
GeneralRe: multi threading Pin
Ravi Bhavnani22-Jun-05 7:59
professionalRavi Bhavnani22-Jun-05 7:59 
GeneralMaking Menu Selections through Program Pin
Abhishek Karnik21-Jun-05 10:01
Abhishek Karnik21-Jun-05 10:01 
Generalstructs in C++ Pin
LCI21-Jun-05 8:40
LCI21-Jun-05 8:40 
GeneralRe: structs in C++ Pin
FlyingTinman21-Jun-05 8:58
FlyingTinman21-Jun-05 8:58 
GeneralRe: structs in C++ Pin
GDavy21-Jun-05 8:58
GDavy21-Jun-05 8:58 
GeneralRe: structs in C++ Pin
John R. Shaw21-Jun-05 15:11
John R. Shaw21-Jun-05 15:11 
QuestionHow to know running task? Pin
lewislewis_lewis21-Jun-05 8:37
lewislewis_lewis21-Jun-05 8:37 
AnswerRe: How to know running task? Pin
Blake Miller21-Jun-05 9:22
Blake Miller21-Jun-05 9:22 
Generalthanks Pin
lewislewis_lewis21-Jun-05 9:26
lewislewis_lewis21-Jun-05 9:26 
QuestionWhat is LPCTSTR? & how to convert 2 a char? Pin
tomek1821-Jun-05 6:57
tomek1821-Jun-05 6:57 
AnswerRe: What is LPCTSTR? & how to convert 2 a char? Pin
David Crow21-Jun-05 7:11
David Crow21-Jun-05 7:11 
AnswerRe: What is LPCTSTR? & how to convert 2 a char? Pin
TheGreatAndPowerfulOz21-Jun-05 7:18
TheGreatAndPowerfulOz21-Jun-05 7:18 
AnswerRe: What is LPCTSTR? & how to convert 2 a char? Pin
John R. Shaw21-Jun-05 8:23
John R. Shaw21-Jun-05 8:23 
QuestionHOW TO: Timer / tic function in C woes Pin
kevingpo21-Jun-05 6:18
kevingpo21-Jun-05 6:18 
AnswerRe: HOW TO: Timer / tic function in C woes Pin
BlackDice21-Jun-05 6:20
BlackDice21-Jun-05 6:20 

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.