def METHOD_NAME(self):
    """
    This is the main function of the separate worker threads.
    """
    while True:
        if self.stop_event.is_set():
            return
        with self.heap_lock:
            try:
                when, func, interval = heapq.heappop(self.heap)
                self.next_scheduled = when
            except IndexError:
                # There is nothing to do so shutdown this thread.  Another
                # will be started up if we are under the max thread count
                # and there are more scheduled than the current number of
                # threads
                logging.info("Nothing for gather thread to do, shutting down")
                return
        # If _wait_until_gather returns false then it isn't time to
        # actually do the gathering because either 1) the scheduler is
        # shutting down, or 2) there is another item scheduler earlier than
        # what was previously scheduled -- so reschedule the current
        # gathering and start over.
        if not self._wait_until_gather(when):
            with self.heap_lock:
                self._schedule_gathering(when, func, interval)
                continue
        with self.heap_lock:
            if func in self.func_blacklist:
                self.func_blacklist.remove(func)
                continue
        func()
        with self.heap_lock:
            self._schedule_gathering(interval + when, func, interval)