in reply to Can a perl script on windows set it's self priority level?
Yes, SetPriorityClass in Win32::Process calls the system call with the same name.
The code would look like
use Win32::Process qw( HIGH_PRIORITY_CLASS ); Win32::Process::Open(my $proc, $$, 0) or die($^E); $proc->SetPriorityClass(HIGH_PRIORITY_CLASS) or die($^E);
Update: Added parameter missing from call to Open, as mentioned in a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can a perl script on windows set it's self priority level?
by Eradicatore (Monk) on Dec 19, 2007 at 20:09 UTC |