Skip to content

Instantly share code, notes, and snippets.

@ruxkor
Created July 30, 2015 12:31
Show Gist options
  • Save ruxkor/e9ec27e3adcf3a00ff9e to your computer and use it in GitHub Desktop.
Save ruxkor/e9ec27e3adcf3a00ff9e to your computer and use it in GitHub Desktop.
import gc
from greenlet import greenlet
import traceback
def dumpGreenlets():
for ob in gc.get_objects():
if not isinstance(ob, greenlet):
continue
if not ob:
continue
print(''.join(traceback.format_stack(ob.gr_frame)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment