def iterate(self, delay=0):
        """
        One iteration of the event loop, for trial's use.

        This is not used for actual reactor runs.
        """
        self.runUntilCurrent()
        while self._pending():
            self._iteration(0)

        One iteration of the event loop, for trial's use.

        This is not used for actual reactor runs.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/_glibbase.py