[pypy-issue] [issue1549] eventlet errors on PyPy, but not CPython

Alex Gaynor tracker at bugs.pypy.org
Fri Jul 19 16:04:56 CEST 2013


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

Code to reproduce: this is extracted from openstack-eventlet


import sys

from eventlet import GreenPool


class ContextPool(GreenPool):
    "GreenPool subclassed to kill its coros when it gets gc'ed"

    def __enter__(self):
        return self

    def __exit__(self, type, value, traceback):
        for coro in list(self.coroutines_running):
            coro.kill()


def _noop():
    pass


def main(argv):
    with ContextPool(3) as pool:
        pool.spawn(_noop)


if __name__ == "__main__":
    main(sys.argv)

----------
messages: 5958
nosy: agaynor, pypy-issue
priority: bug
status: unread
title: eventlet errors on PyPy, but not CPython

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1549>
________________________________________


More information about the pypy-issue mailing list