Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
⚡ limit multithreading to 7 extra threads
Browse files Browse the repository at this point in the history
see #904
  • Loading branch information
GitSquared committed Nov 20, 2020
1 parent 048feb5 commit 37ba84a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/_multithread.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ if (cluster.isMaster) {
const electron = require("electron");
const ipc = electron.ipcMain;
const signale = require("signale");
const numCPUs = require("os").cpus().length - 1; // Leave a core available for the renderer process
const osCPUs = require("os").cpus().length
// See #904
// Also, leave a core available for the renderer process
const numCPUs = (osCPUs > 8) ? 7 : osCPUs;

const si = require("systeminformation");

Expand Down

0 comments on commit 37ba84a

Please sign in to comment.