• Kirill Smelkov's avatar
    libgolang/gevent: Put explicit try/catch boundary for tasks spawned via go · 07cae4e9
    Kirill Smelkov authored
    Else as https://github.com/python-greenlet/greenlet/pull/285
    demonstrates there can be segmentation faults and crashes due to
    exceptions from one greenlet propagating to C stack of another greenlet.
    
    No test here. I've tried to do it, but with gevent (contrary to plain
    greenlets), spawning new task only schedules corresponding greenlet to
    run in the end of current event loop cycle instead of switching to
    created greenlet immediately. With this delaying, it was hard for me to
    develop corresponding test in a reasonable time.
    
    Hopefully having the test I've done for greenlet itself + hereby
    protection is good enough.
    
    /reviewed-on !17
    07cae4e9
_runtime_gevent.pyx 5.63 KB