开发者

how to code thread synchronization using any method - eg ..Cevent

开发者 https://www.devze.com 2023-01-07 05:07 出处:网络
hello there I am trying to code a simple application which would help me in reading from a serial port and write to the same serial port using a single 开发者_Python百科thread ...so could someone plea

hello there I am trying to code a simple application which would help me in reading from a serial port and write to the same serial port using a single 开发者_Python百科thread ...so could someone please help me to manage the synchronization between the threads.heres the source code- the whole project file in Visual studio 6 - http://rapidshare.com/files/406340281/SerialPortTest.rar

Thanks

Sayonee


The easiest way to add synchronization is to use a CRITICAL_SECTION.

Try to find variables/functions/... that shouldn't be set/executed at the same time and protect them using a critical section.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号