Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Andrew Savchenko
On Wed, 14 Dec 2016 12:32:41 -0600 Nathan Zachary wrote: > On 14/12/16 12:29, Fabian Groffen wrote: > > On 14-12-2016 13:01:16 -0500, Doug Freed wrote: > >> On Wed, Dec 14, 2016 at 12:48 PM, Nathan Zachary > >> wrote: > >>> On 14/12/16 10:11, Doug Freed wrote: > > I

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Mike Gilbert
On Wed, Dec 14, 2016 at 1:29 PM, Fabian Groffen wrote: > On 14-12-2016 13:01:16 -0500, Doug Freed wrote: >> On Wed, Dec 14, 2016 at 12:48 PM, Nathan Zachary >> wrote: >> > On 14/12/16 10:11, Doug Freed wrote: >> >>> I somehow doubt that would give me

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Francesco Riosa
2016-12-14 19:32 GMT+01:00 Nathan Zachary : > On 14/12/16 12:29, Fabian Groffen wrote: > > On 14-12-2016 13:01:16 -0500, Doug Freed wrote: > >> On Wed, Dec 14, 2016 at 12:48 PM, Nathan Zachary > >> wrote: > >>> On 14/12/16 10:11, Doug Freed

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Nathan Zachary
On 14/12/16 12:29, Fabian Groffen wrote: > On 14-12-2016 13:01:16 -0500, Doug Freed wrote: >> On Wed, Dec 14, 2016 at 12:48 PM, Nathan Zachary >> wrote: >>> On 14/12/16 10:11, Doug Freed wrote: > I somehow doubt that would give me the expected number only, and I lack

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Fabian Groffen
On 14-12-2016 13:01:16 -0500, Doug Freed wrote: > On Wed, Dec 14, 2016 at 12:48 PM, Nathan Zachary > wrote: > > On 14/12/16 10:11, Doug Freed wrote: > >>> I somehow doubt that would give me the expected number only, and I lack > >>> a BSD install handy to test it. > >>

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Doug Freed
On Wed, Dec 14, 2016 at 12:48 PM, Nathan Zachary wrote: > On 14/12/16 10:11, Doug Freed wrote: >> On Wed, Dec 14, 2016 at 11:04 AM, Michał Górny wrote: >>> On Wed, 14 Dec 2016 15:27:25 +0300 >>> Andrew Savchenko wrote: >>> On

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Nathan Zachary
On 14/12/16 10:11, Doug Freed wrote: > On Wed, Dec 14, 2016 at 11:04 AM, Michał Górny wrote: >> On Wed, 14 Dec 2016 15:27:25 +0300 >> Andrew Savchenko wrote: >> >>> On Tue, 13 Dec 2016 10:36:15 +0100 Michał Górny wrote: + nproc=$(python -c

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Doug Freed
On Wed, Dec 14, 2016 at 11:04 AM, Michał Górny wrote: > On Wed, 14 Dec 2016 15:27:25 +0300 > Andrew Savchenko wrote: > >> On Tue, 13 Dec 2016 10:36:15 +0100 Michał Górny wrote: >> > + nproc=$(python -c 'import multiprocessing; >> >

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Michał Górny
On Wed, 14 Dec 2016 15:27:25 +0300 Andrew Savchenko wrote: > On Tue, 13 Dec 2016 10:36:15 +0100 Michał Górny wrote: > > Introduce get_nproc(), a portable 'nproc' wrapper. It uses either > > 'nproc' or a fallback Python multiprocessing module call to attempt to > > determine

Re: [gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-14 Thread Andrew Savchenko
On Tue, 13 Dec 2016 10:36:15 +0100 Michał Górny wrote: > Introduce get_nproc(), a portable 'nproc' wrapper. It uses either > 'nproc' or a fallback Python multiprocessing module call to attempt to > determine the number of available processing units. > > This can be used e.g. to determine a safe

[gentoo-dev] [PATCH 2/3] multiprocessing.eclass: Introduce get_nproc() to get no of CPUs

2016-12-13 Thread Michał Górny
Introduce get_nproc(), a portable 'nproc' wrapper. It uses either 'nproc' or a fallback Python multiprocessing module call to attempt to determine the number of available processing units. This can be used e.g. to determine a safe number of jobs to run when MAKEOPTS specifies unlimited --jobs and