real time application with GUI

I have written a GUI to sit on top of a real time application for audio processing.  Currently, I call the Application Run method and when the form loads, I spawn a thread which runs the real time processing.  

I am concerned that the real time processing will fall behind because the main thread the GUI is running in will steal time.  Can someone suggest a way to make the GUI thread be a low priority, and the real time processing thread be a higher priority?

thanks
Bryan
bryanwellsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
saturn_oneConnect With a Mentor Commented:
What you can do is before starting you new Proccessing thread, set the current thread which is the GUI thread to to lower priority

Thread.CurrentThread.Priority=ThreadPriority.Lowest;
or
Thread.CurrentThread.Priority=ThreadPriority.BelowNormal;

and set your new thread to higher priority

YourNewThread.Priority= ThreadPriority.Highest;
YourNewThread.Start();

hope it helps
0
 
ptmcompCommented:
I think to set a higher priority for the real time thread should be enough else it could be that the GUI thread doesn't get any time slices since all the other threads and processes have ThreadPriority.Normal.
0
All Courses

From novice to tech pro — start learning today.