Set thread execution state

prevent Windows from falling into standby
patch from LoRd_MuldeR