You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned on #60, there is a bug in the old implementation (wakepy/_deprecated/_windows.py). Since the SetThreadExecutionState changes "execution state" of current thread to either
Prevent display power management
Prevent suspend
No prevented
if someone uses multiple wakelocks / activates multiple modes in a single thread, it will not work. For example this:
…ther (#342)
Fixes: #167
Previously:
Using SetThreadExecutionState Method twice on same thread (having both
active at same time) would make the methods interfere with each other,
as the flags set are global to the thread.
Now:
The SetThreadExecutionState Method may have multiple modes (same or
different) activated within the same python thread without them
interfering with each other on activation or deactivation, as wakepy
creates a separate worker thread for the single purpose of setting and
keeping the thread execution flag each time you activate a mode with the
SetThreadExecutionState wakepy.Method.
As mentioned on #60, there is a bug in the old implementation (wakepy/_deprecated/_windows.py). Since the SetThreadExecutionState changes "execution state" of current thread to either
if someone uses multiple wakelocks / activates multiple modes in a single thread, it will not work. For example this:
keep.presenting
mode.keep.presenting
mode is active duringbaz()
keep.running
mode, which is active duringquux()
. Only sleep is prevented, but display might turn off.keep.running
mode exits, the whole execution state is cleared with ES_CONTINUOUSbar()
is being run without any mode active at all. System could go to sleep and display might turn off.This bug has been there since the first version of wakepy.
Task
The text was updated successfully, but these errors were encountered: