emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] support for accessing CPU/core count (processor-count)


From: Andy Moreton
Subject: Re: [PATCH] support for accessing CPU/core count (processor-count)
Date: Sun, 10 Oct 2021 11:50:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt)

On Sun 10 Oct 2021, Campbell Barton wrote:

> Hi, this patch adds support for accessing the number of CPU's / cores on a
> system, matching CPython's multiprocessing.cpu_count() [0].
>
> I've only tested this for Linux, this includes code that should work on other
> platforms, although that would need to be double-checked of course.
> For reference I checked CPython / Blender & Stack-overflow [1]
>
> Accessing this information can be useful to automatically detect the number of
> jobs to run.

This logic already exists in `comp-effective-async-max-jobs' from
comp.el, as an internal implementation detail. Perhaps it would be
better to refactor that code.

    AndyM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]