def callWhenRunning(self, _callable, *args, **kw):
        """See twisted.internet.interfaces.IReactorCore.callWhenRunning.
        """
        if self.running:
            _callable(*args, **kw)
        else:
            return self.addSystemEventTrigger('after', 'startup',
                                              _callable, *args, **kw)
See twisted.internet.interfaces.IReactorCore.callWhenRunning.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/base.py