summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Edström <meedstrom@runbox.eu>2026-03-06 07:41:13 +0100
committerMartin Edström <meedstrom@runbox.eu>2026-03-06 07:43:15 +0100
commit8b21c8f9a47a71102bf4ec08504b044aeab880fe (patch)
tree9b452ae21801e0b535423a1807fac0758dc9c794
parent5ce8bdf4886ee275d56a238a9786296ee4697500 (diff)
Prolly no need to divide num-processors by half after all.
-rw-r--r--el-job-ng.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/el-job-ng.el b/el-job-ng.el
index 86b515c..1848833 100644
--- a/el-job-ng.el
+++ b/el-job-ng.el
@@ -29,10 +29,9 @@
;; https://github.com/meedstrom/el-job/pull/5
;; https://github.com/emacs-mirror/emacs/commit/e02466a579a58fceda33ad51d822e39543bc883c
(defcustom el-job-ng-max-cores
- (max 1 (- (if (eq system-type 'windows-nt)
- (/ (min 32 (num-processors)) 2)
- (num-processors))
- 1))
+ (max 1 (if (eq system-type 'windows-nt)
+ (min (- (num-processors) 1) 16)
+ (- (num-processors) 1)))
"A limit on the number of subprocesses for one job.
Windows can get \"error: Could not create child process\"
if making too many processes, so capping it can help."