Solved

real time application with GUI

Posted on 2004-03-28
2
242 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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now