def kill(self, recursive=True):
        request = self.request
        io = self.io
        self.request = None
        self.io = None

        if hasattr(self, 'disconnect'):
            getattr(self, 'disconnect')()

        for callback, ar, kwar in self._on_disconnect:
            # NOTE: should we have a way to declare Blocking on_disconnect
            # callbacks, or should these things all be spawned to some other
            # greenlets ?
            callback(*ar, **kwar)
        self._on_disconnect = []

        if self._parent:
            parent = self._parent
            self._parent = None
            if recursive:
                return parent.kill(recursive)
            return parent  # otherwise, switch context
        else:
            if io:
                io.session.kill()
            return
Count the number of columns in the row with key `key`.
dataset/ETHPy150Open abourget/pyramid_socketio/pyramid_socketio/io.py/SocketIOContext.kill--crossover with--dataset/ETHPy150Open pycassa/pycassa/pycassa/columnfamily.py/ColumnFamily.get_count