Call the given function with args in the reactor thread.

def _call_in_reactor_thread(self, f, *args, **kwargs):
        """Call the given function with args in the reactor thread."""
        self._reactor.callFromThread(f, *args, **kwargs)