[Piglit] [PATCH 2/3] framework: allow specifying the number of jobs for concurrency

Marek Olšák maraeo at gmail.com
Wed May 30 21:40:05 UTC 2018


On Wed, May 30, 2018 at 5:26 PM, Dylan Baker <dylan at pnwbakers.com> wrote:

> Quoting Marek Olšák (2018-05-30 14:14:35)
> > On Wed, May 30, 2018 at 4:21 PM, Dylan Baker <dylan at pnwbakers.com>
> wrote:
> >
> >     Quoting Marek Olšák (2018-05-30 13:04:47)
> >     >      single = multiprocessing.dummy.Pool(1)
> >     > -    multi = multiprocessing.dummy.Pool()
> >     > +    if not jobs or jobs < 0:
> >     > +        jobs = os.cpu_count()
> >     > +    multi = multiprocessing.dummy.Pool(jobs)
> >
> >     If you set processes=None instead of processes=-1 by default we can
> drop
> >     the if
> >     statement above, when processes == None, os.cpu_count() is used
> >     automatically by
> >     Pool class.
> >
> >
> > Did you mean jobs?
>
> Yes, the first argument to multiprocessing.dummy.Pool() is "processes", so
> in
> this case jobs == process. Sorry for the confusion.
>

The updated patch is already on the list.

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180530/765a5f90/attachment-0001.html>


More information about the Piglit mailing list