def _run(self):
tup = self.read_tuple()<EOL>with self._batch_lock:<EOL><INDENT>self._current_tups = [tup]<EOL>if self.is_heartbeat(tup):<EOL><INDENT>self.send_message({"<STR_LIT>": "<STR_LIT>"})<EOL><DEDENT>elif self.is_tick(tup):<EOL><INDENT>self.process_tick(tup)<EOL><DEDENT>else:<EOL><INDENT>self.process(tup)<EOL><DEDENT>self._current_tups = []<EOL><DEDENT>
The inside of ``run``'s infinite loop.

        Separate from BatchingBolt's implementation because
        we need to be able to acquire the batch lock after
        reading the tuple.

        We can't acquire the lock before reading the tuple because if
        that hangs (i.e. the topology is shutting down) the lock being
        acquired will freeze the rest of the bolt, which is precisely
        what this batcher seeks to avoid.