Question Priority Set from my own program

sinanissa

New member
Joined
Jul 7, 2010
Messages
2
Programming Experience
3-5
I am developing a real time application that should run at real time when it is taking the information from the hardware installed on the PC. It is direct readings of the machine.
at the same time, I need to use the database to store these data, this means that I need to get the program to a normal priority during the database connection (all this is what I think). So Can I do it in Visual Basic?

Just for the information, I was able to run the program on realtime priority using a shortcut with the following target:"C:\Windows\System32\cmd.exe /C start /high %1" replacing the %1 with the program path and name. But what I need is: to make the program realtime at specified steps of the program, where I need to take the readings from the machine. The computer need to be used for reporting also, such as excel sheets, word files, and printing.
 
thnx but I think it is not the answer

This command has no relation with the operating system.

Quote from the help file that u submit: "Operating systems are not required to honor the priority of a thread."

thank you for the info but still the solution is not reached for me.
 
But it does! It is just a warning that in case the OS is busy it may not prioritize like you wish. Also if many threads request higher priority the OS have to choose between them. Higher priority threads is in most cases processed first, or more accurately given more cpu time. See this article for example, esp the Thread Priorities section: Beginners Guide To Threading In .NET Part 1 of n - CodeProject
 

Latest posts

Back
Top