python-3.xpoolgeventgreenlets

Gevents groups vs Gevents pools


I am beginning to learn about gevents, referring this tutorial : http://sdiehl.github.io/gevent-tutorial/.

I can't really understand any major difference between a group of greenlets and a pool of greenlets. Can someone please explain or point to a source where the answer might be documented, preferably with an example.


Solution

  • According to the docs, they are identically, except:

    A pool is like a group, but the maximum number of members is governed by the size parameter.

    As you can see in the sources, a Pool inherits from Group.