import gc
import gevent
from greenlet import greenlet
gevent.killall([obj for obj in gc.get_objects() if isinstance(obj, greenlet)])
In a gevent appliction, how can I kill all greenlets that have been started?