Solved

real time application with GUI

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 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