simplify core: get rid of watcher/watcher_ref split
all watchers now behave like they did in 0.13: the incref themselves while in use by the event loop (that is, _ref versions are kept but without _ref in the name) one reason for that is that doing ev_watcher_stop in watcher's __dealloc__ crashes: loop attribute is no longer a valid reference in __dealloc__; (although this could probably be worked around) another reason is to make it simpler, having 2 sets of watchers is complex to explain. third reason is: using watchers that automatically stopped themselves on __dealloc__ introduced a lot of incompatibilities and potentially unexpected behaviour compared to gevent-0.13. it is also not recommended in general to depend on CPython's refcounting for resource management.
Showing
Please register or sign in to comment