« Previous | Next » 

Revision c258f110

IDc258f1103f13d5c2ec70aa10cb0dbba877d65fec

Added by Michael Hanselmann over 11 years ago

workerpool: Use itertools.count instead of manual counting

Instead of having to explicitely increment the value (“… += 1”), a call
to next() is enough. These numbers should in no case be re-used (they
are used for ordering tasks). Using “itertools.count” is useful here as
it guarantees that a returned number won't be returned another time.
Manual code for this could, over the course of time, gain unintended
bugs.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences