set method

Engages, renews or releases the hold.

Requests are serialised: a gate and a consumer delegate may both await, so two operators (or an operator and an expiring lease) must not interleave into a state where the bookkeeping and the platform disagree.

Implementation

Future<PatchbayInvocation> set(
  PatchbayKeepAwakeRequestWire request, {
  String? requestId,
}) {
  final String id = requestId ?? _newRequestId();
  return _enqueue(() => _apply(request, id));
}