branches with status:
Name Status Last Modified Last Commit
lp:~zoni/rocket/rocket 1 Development 2013-01-01 17:02:24 UTC
196. Fix growing by negative amount when m...

Author: Nick Groenen
Revision Date: 2013-01-01 16:47:49 UTC

Fix growing by negative amount when max_threads = 0

grow() checks if max_threads has been reached, in which case it refuses
to grow any further. It does this with:
 amount = min([amount, self.max_threads - len(self.threads)])

With max_threads = 0 (indicating grow indefinitely), the latter will
always be a negative number, causing grow() to grow by a negative amount.

With this commit, this check against max_threads is skipped when
max_threads = 0, ensuring it will always keep growing in this case.

11 of 1 result