* miscfuncs.cc (low_priority_sleep): Correct thinko which caused SetPriority to
be called unnecessarily. * thread.cc (pthread::init_main_thread): Call new create_cancel_event function. (pthread::precreate): Ditto. (pthread::postcreate): Remove cancel_event creation. (pthread::create_cancel_event): Define new function. * thread.h (pthread::create_cancel_event): Declare new function.
This commit is contained in:
@ -334,7 +334,7 @@ low_priority_sleep (DWORD secs)
|
||||
SetThreadPriority (thisthread, new_prio);
|
||||
Sleep (secs);
|
||||
|
||||
if (!staylow || curr_prio == new_prio)
|
||||
if (!staylow && curr_prio != new_prio)
|
||||
SetThreadPriority (thisthread, curr_prio);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user