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

Dylan Baker dylan at pnwbakers.com
Wed May 30 21:26:30 UTC 2018


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.

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180530/e2fae4d4/attachment.sig>


More information about the Piglit mailing list