Commit c87bf86e authored by Jason Madden's avatar Jason Madden

Failing test for issue #728

parent 0151c000
# We simply import a stdlib module
__import__('netrc')
import gevent
# For reproducing #728: We spawn a greenlet at import time,
# that itself wants to import, and wait on it at import time.
# If we're the only greenlet running, and locks aren't granular
# enough, this results in a LoopExit (and also a lock deadlock)
def f():
__import__('_imports_at_top_level')
g = gevent.spawn(f)
g.get()
#!/usr/bin/env python
from gevent.monkey import patch_all
patch_all()
if __name__ == '__main__':
# Reproducing #728 requires a series of nested
# imports
__import__('_imports_imports_at_top_level')
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