Solved

real time application with GUI

Posted on 2004-03-28
2
255 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# GridRow get Old/New Value 1 55
What's the most efficient way to load up a couple of large table in C#? 5 39
LINQ - C# to VB convertion 12 48
Problem to error 4 47
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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 …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

21 Experts available now in Live!

Get 1:1 Help Now