Hello everyone,
I am confused about the statement from the book Threading in C# about thread priority,
http://www.albahari.com/threading/
the confusing statement is, "The ideal solution is to have the real-time work and user interface in separate processes". Why the solution works and ideal?
The whole paragraph is,
--------------------
If the real-time application has a user interface, it can be undesirable to elevate the process priority because screen updates will be given excessive CPU time – slowing the entire computer, particularly if the UI is complex. (Although at the time of writing, the Internet telephony program Skype gets away with doing just this, perhaps because its UI is fairly simple). Lowering the main thread’s priority – in conjunction with raising the process’s priority – ensures the real-time thread doesn’t get preempted by screen redraws, but doesn’t prevent the computer from slowing, because the operating system will still allocate excessive CPU to the process as a whole. The ideal solution is to have the real-time work and user interface in separate processes (with different priorities), communicating via Remoting or shared memory. Shared memory requires P/Invoking
the Win32 API (web-search CreateFileMapping and MapViewOfFile).
--------------------
thanks in advance,
George