'Clears the collection and closes all open descriptors.'

def clear(self):

    with self._lock:
        for descriptor in self._descriptors:
            descriptor.close()
        self._descriptors.clear()
        self._descriptor_for_fd.clear()
        self._descriptor_for_path.clear()
        self._kevents = []
