Add Greenlet.add_spawn_callback() and Greenlet.remove_spawn_callback()
These methods allow to set up code to intercept Greenlet objects creation. This is useful to implement custom tracing of gevent tasks and custom variants of `gevent.local()`. The performance impact is minuscule: one extra fast "if" check in `Greenlet.__init__`.
Showing
Please register or sign in to comment