> From: Ship Mints <shipmints@gmail.com>
> Date: Thu, 6 Feb 2025 07:24:37 -0500
> Cc: 63620@debbugs.gnu.org, eliz@gnu.org, michael.albinus@gmx.de,
> monnier@iro.umontreal.ca
>
> The API on macOS would expose a pair of C functions to lisp, one would inhibit sleep, perhaps returning an
> opaque "cookie", the second to revoke the inhibition.
Why would this have to be exposed to Lisp? We want to make sure the
system doesn't go to sleep until after the function invoked by the
"about to go to sleep" event completes its job and exits, and for that
all we need is to revoke the inhibition once the function exits, no?
That's right. The revocation on macOS requires calling an objective-c API to relinquish the inhibition.