ProcessPowerAssertionHandle class final

One spawned helper process holding an assertion. release kills the child (dropping the assertion immediately) and waits for its exit — BOUNDED by killTimeout (5s default): a helper that ignores SIGTERM gets one follow-up SIGKILL and release proceeds anyway (issue #326: an unbounded await on a stuck helper would hang the run's settle). An unexpected helper death flips held so /power never reports a dead assertion as live.

Implemented types

Constructors

ProcessPowerAssertionHandle({required Process process, required String description, Duration killTimeout = defaultKillTimeout})

Properties

description String
What is holding the machine awake (e.g. caffeinate -i -w 4242) — shown by /power and diagnostics.
final
hashCode int
The hash code for this object.
no setterinherited
held bool
Whether the assertion is currently held.
no setteroverride
killTimeout Duration
Per-handle override of defaultKillTimeout (tests).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release() Future<void>
Drops the assertion. Safe to call more than once.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

defaultKillTimeout → const Duration
How long release waits for the helper to die after SIGTERM before escalating to SIGKILL and proceeding anyway.