2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2017 Signal Messenger, LLC
|
2020-10-30 20:34:04 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2017-06-22 00:26:05 +00:00
|
|
|
let shouldQuitFlag = false;
|
|
|
|
|
2021-06-18 17:04:27 +00:00
|
|
|
export function markShouldQuit(): void {
|
2017-06-22 00:26:05 +00:00
|
|
|
shouldQuitFlag = true;
|
|
|
|
}
|
|
|
|
|
2021-06-18 17:04:27 +00:00
|
|
|
export function shouldQuit(): boolean {
|
2017-06-22 00:26:05 +00:00
|
|
|
return shouldQuitFlag;
|
|
|
|
}
|
2021-10-01 18:49:59 +00:00
|
|
|
|
|
|
|
let isReadyForShutdown = false;
|
|
|
|
|
|
|
|
export function markReadyForShutdown(): void {
|
|
|
|
isReadyForShutdown = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function readyForShutdown(): boolean {
|
|
|
|
return isReadyForShutdown;
|
|
|
|
}
|
2022-06-30 21:33:58 +00:00
|
|
|
|
|
|
|
let hasRequestedShutdown = false;
|
|
|
|
|
|
|
|
export function markRequestedShutdown(): void {
|
|
|
|
hasRequestedShutdown = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function requestedShutdown(): boolean {
|
|
|
|
return hasRequestedShutdown;
|
|
|
|
}
|