Solved

real time application with GUI

Posted on 2004-03-28
2
265 Views
Last Modified: 2010-04-15
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
0
Comment
Question by:bryanwells
2 Comments
 

Accepted Solution

by:
saturn_one earned 125 total points
ID: 10700968
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
 
LVL 10

Expert Comment

by:ptmcomp
ID: 10706258
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

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question