开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜