Activity log for bug #1095077

Date Who What changed Old value New value Message
2013-01-01 17:12:54 Nick Groenen bug added bug
2013-01-01 17:17:07 Nick Groenen description While playing around with Rocket, I noticed my threadpool wasn't growing when I had max_threads set to 0, which should indicate there's no upper boundary on the maximum number of threads it may create. I tracked this down to a peace of code in grow() which ensures it never grows beyond it's max_threads, but didn't take into consideration what would happen with max_threads set to 0. I fixed this here: http://bazaar.launchpad.net/~zoni/rocket/rocket/revision/196#rocket/threadpool.py (I added a line of comment as well because the first time I saw that line of code, it wasn't clear to me what it's purpose was.) I did look at the unit tests, but couldn't see a quick way to test for this use case, so I'll leave that up to another taker. :) Setting max_threads to 0 there without this commit causes 3 test failures though, after my commit, only 1 test failure remains. While playing around with Rocket, I noticed my threadpool wasn't growing when I had max_threads set to 0, which should indicate there's no upper boundary on the maximum number of threads it may create. I tracked this down to a piece of code in grow() which ensures it never grows beyond it's max_threads, but didn't take into consideration what would happen with max_threads set to 0. I fixed this here: http://bazaar.launchpad.net/~zoni/rocket/rocket/revision/196#rocket/threadpool.py (I added a line of comment as well because the first time I saw that line of code, it wasn't clear to me what it's purpose was.) I did look at the unit tests, but couldn't see a quick way to test for this use case, so I'll leave that up to another taker. :) Setting max_threads to 0 there without this commit causes 3 test failures though, after my commit, only 1 test failure remains.