freeprocess priority
BlitzMax Forums/BlitzMax Programming/freeprocess priority
| ||
When using TProcess.Create(command, HIDECONSOLE) to spawn a child task. The child is taking almost 100% of the CPU and causes the machine to slow considerably. Is there a way to pass a priority like the task manger accepts? i.e. Realtime High Above Normal Normal Below Normal Low |
| ||
Priority won't help you here. You need to stop the child process eating up cycles by either implementing a message pump or using a small delay in the main program loop. |
| ||
Yeah I wrote some code to change the priority in Windows. There's actually two different priority levels: process priority class AND thread priority. Anyway if you set them both too high it can interfere with the OS. In the end I don't use it anyway as it did weird stuff like cause delays to windows redrawing. |
| ||
Thnks, I want to set the piority of this task to be low so it does not interfere with other windows tasks. I have now written a .VBS scipt to achive this but that wont execute with system_ or freeprocess.Create()??? Arggghhh windows! |
| ||
I have now written a .VBS scipt to achive this but that wont execute with system_ or freeprocess.Create()??? Arggghhh windows! Try passing the file path of the VBS file to OpenUrl(). ;-) |
| ||
@SebHoll, Thnk's that seems to work well. |