Skip to content

fix: keep sleep prevented until the last request is released - #541

Merged
devopvoid merged 1 commit into
mainfrom
fix/power-management-requests
Nov 5, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/power-management-requests

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Repeated enableUserActivity() calls lost the handle of the previous request on macOS and Linux, so one disable could not undo them.

Each PowerManagement instance is now one idempotent request, and the native assertion is released with the last one. Windows moves to power requests, since the thread execution state cannot be released from another thread.

Behavior change: disabling an instance no longer ends the request of another instance.

Each PowerManagement instance is now one idempotent request, and the native assertion is released with the last one. Windows moves to power requests, since the thread execution state cannot be released from another thread.
@devopvoid
devopvoid merged commit b67d66d into main Nov 5, 2026
26 checks passed
@devopvoid
devopvoid deleted the fix/power-management-requests branch November 5, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant