"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.requestRestart = requestRestart;
exports.restartNeeded = restartNeeded;
exports.resetRestartNeeded = resetRestartNeeded;
const index_ts_1 = require("../server/status/index.js");
let restartArrayBuffer;
let restartNeededArray;
function ensureInitialized() {
    if (!restartArrayBuffer) {
        restartArrayBuffer = index_ts_1.Status.primaryStore.getUserSharedBuffer('restart-needed', new ArrayBuffer(1));
        restartNeededArray = new Uint8Array(restartArrayBuffer);
    }
}
function requestRestart() {
    ensureInitialized();
    restartNeededArray[0] = 1;
}
function restartNeeded() {
    ensureInitialized();
    return restartNeededArray[0] === 1;
}
function resetRestartNeeded() {
    ensureInitialized();
    restartNeededArray[0] = 0;
}
//# sourceMappingURL=requestRestart.js.map