C# How to maximize chance that particular section of code will have no context switch?
问题 I have time-critical piece of code in my app. I made the thread which runs it Highest priority - that's the most I could do. Is there any suggestions on how to make part of the code run in this thread to be interrupted as few times as possible (less context switch occurred) ? The code is not complicated. I replaced all the method calls with inlined code and I don't use anything of high level (like no LINQ). The most of operations are arithmetic. There is only one comparison of strings (I am