开发者

One thread in Real Time priority freezes Windows 7.

I just moved from WinXP to Win7. My software needs to have real time response to I/O so it makes a busy-wait in one thread (which has affinity to run on one CPU).

The result is 100% CPU on one of the cores and 0% CPU for others, on Winows XP it worked just fine. In Windows 7 the system freezes. (The so开发者_开发技巧ftware is a console application, for Windows application it behaves a bit different. only if the main thread make busy-wait without peeking messages it freezes)

Any ideas ?


So you're using a non real-time OS for realtime I/O. Simply put the code isn't working correctly and should do a non busy-wait (change to a sleep-wait) loop and change the thread timer settings to something that is realtime enough.

See this question to setup windows for millisecond precision on a timer callback.

How to trigger a C# function at a certain time with millisecond precision?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜