Add `is_watching` method to UvWatcher class

Fixes #1052
This commit is contained in:
ZyX 2014-09-02 22:01:50 +04:00
parent b638a8e1c9
commit c564b64530
1 changed files with 4 additions and 0 deletions

View File

@ -87,6 +87,10 @@ class UvWatcher(object):
return
watch.close(partial(self._stopped_watching, path))
def is_watching(self, path):
with self.lock:
return path in self.watches
def __del__(self):
try:
lock = self.lock