def _do_write(self):
with self.lock:<EOL><INDENT>self._commit_counter += <NUM_LIT:1><EOL>if self._commit_counter >= self._commit_every:<EOL><INDENT>self._db.commit()<EOL>self._commit_counter = <NUM_LIT:0><EOL><DEDENT><DEDENT>
Check commit counter and do a commit if need be