Revision c258f110
ID | c258f1103f13d5c2ec70aa10cb0dbba877d65fec |
Parent | b9612abb |
Child | 7ae5d703 |
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 <hansmi@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Files
- added
- modified
- copied
- renamed
- deleted