Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,20 @@ function App () {
await this.stop();
process.exit(0);
});

/**
*
* @param {number} ms milliseconds to wait
*/
function blockingSleep (ms) {
const int32 = new Int32Array(new SharedArrayBuffer(4));
Atomics.wait(int32, 0, 0, ms);
}

process.on("exit", () => {
// wait before exiting so that child processes (e.g. systeminformation) have some additional time
blockingSleep(1000);
});
}

module.exports = new App();