def close(self):
        """Close all active poll instances and remove all callbacks."""
        if self._mpoll is None:
            return
        for mpoll in self._mpoll.values():
            mpoll.close()
        self._mpoll.clear()
        self._mpoll = None