in reply to Re: require Win32::Process, barewords "THREAD_PRIORITY_BELOW_NORMAL" not allowed?
in thread require Win32::Process, barewords "THREAD_PRIORITY_BELOW_NORMAL" not allowed?
sub THREAD_PRIORITY_BELOW_NORMAL();
Alternative:
BEGIN { if ($^O eq 'MSWin32') { require Win32::Process; import Win32::Process; } } if ($^O eq 'MSWin32') { my $pid = Win32::Process::GetCurrentProcessID(); if (Win32::Process::Open(my $obj, $pid, 0)) { $obj->SetPriorityClass(THREAD_PRIORITY_BELOW_NORMAL); } }
|
|---|