'Generate and return a new stream ID in hexadecimal form.
Many stanzas, handlers, or matchers may require unique
ID values. Using this method ensures that all new ID values
are unique in this stream.'

def new_id(self):

    with self._id_lock:
        self._id += 1
        return self.get_id()
