parameters: (self)
return_statement: return True
docstring: Function for handing blocking condition.
  
          Returns:
              bool, True.
docstring_summary: Function for handing blocking condition.
docstring_tokens: Function for handing blocking condition .
function: def block_func(self):
          """
          Function for handing blocking condition.
  
          Returns:
              bool, True.
          """
          with self.cv:
              # if disable is true, the always evaluate to true
              not_time_out = self.cv.wait_for(lambda: (self.row_count < 0 or self.disable),
                                              timeout=get_callback_timeout())
              # time_out will be False if time out occurs
              if not not_time_out:
                  logger.warning("Timeout happened in sync_wait, maybe dataset.sync_update(condition=...) "
                                 "is not added after dataset.create_dict_iterator(...), now disabling lock.")
                  self.disable = True
              self.row_count += 1
          return True
function_tokens: def block_func ( self ) : with self . cv : # if disable is true, the always evaluate to true not_time_out = self . cv . wait_for ( lambda : ( self . row_count < 0 or self . disable ) , timeout = get_callback_timeout ( ) ) # time_out will be False if time out occurs if not not_time_out : logger . warning ( "Timeout happened in sync_wait, maybe dataset.sync_update(condition=...) " "is not added after dataset.create_dict_iterator(...), now disabling lock." ) self . disable = True self . row_count += 1 return True