Commit 55c12de4 authored by Ralf Schmitt's avatar Ralf Schmitt

do not allow creation of pools with size==0

parent 2681a9e9
...@@ -209,7 +209,7 @@ GreenletSet = Group # the old name; will be deprecated in the future ...@@ -209,7 +209,7 @@ GreenletSet = Group # the old name; will be deprecated in the future
class Pool(Group): class Pool(Group):
def __init__(self, size=None, greenlet_class=None): def __init__(self, size=None, greenlet_class=None):
if size is not None and size < 0: if size is not None and size < 1:
raise ValueError('Invalid size for pool (positive integer or None required): %r' % (size, )) raise ValueError('Invalid size for pool (positive integer or None required): %r' % (size, ))
Group.__init__(self) Group.__init__(self)
self.size = size self.size = size
......
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