    def generateId(self):
        '''
        @brief: 生成唯一id，0 < id < 2 ** 32
        @return: id
        @rtype: int
        '''
        # self.__lock.acquire()
        lock = LockGuard(self.__lock)
        ret = self.__uniqId
        ret = (ret + 1) % 0x7FFFFFFF
        while ret <= 0:
            ret = (ret + 1) % 0x7FFFFFFF
        self.__uniqId = ret
        # self.__lock.release()
        return ret
@brief: 生成唯一id，0 < id < 2 ** 32
@return: id
@rtype: int
biliup/Danmaku/tars/__TimeoutQueue.py