Commit 2a27d7b2 authored by Denis Bilenko's avatar Denis Bilenko

when setting priority, check if watcher is not active

parent 84acb0c4
......@@ -385,6 +385,8 @@ define(WATCHER_BASE, `cdef public loop loop
return libev.ev_priority(&self._watcher)
def __set__(self, int priority):
if libev.ev_is_active(&self._watcher):
raise AttributeError("Cannot set priority of an active watcher")
libev.ev_set_priority(&self._watcher, priority)
def feed(self, int revents, object callback, *args):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment