Commit e6273774 authored by Denis Bilenko's avatar Denis Bilenko

Pool: allow size=0 for similarity with ThreadPool which allows maxsize to be 0

parent 6e64e5fa
......@@ -319,8 +319,8 @@ class Failure(object):
class Pool(Group):
def __init__(self, size=None, greenlet_class=None):
if size is not None and size < 1:
raise ValueError('Invalid size for pool (positive integer or None required): %r' % (size, ))
if size is not None and size < 0:
raise ValueError('size must not be negative: %r' % (size, ))
Group.__init__(self)
self.size = size
if greenlet_class is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment