def test_callFromThread(self):
        """
        A function scheduled with L{IReactorThreads.callFromThread} invoked
        from another thread is run in the reactor thread.
        """
        reactor = self.buildReactor()
        result = []

        def threadCall():
            result.append(threading.currentThread())
            reactor.stop()
        reactor.callLater(0, reactor.callInThread,
                          reactor.callFromThread, threadCall)
        self.runReactor(reactor, 5)

        self.assertEqual(result, [threading.currentThread()])

        A function scheduled with L{IReactorThreads.callFromThread} invoked
        from another thread is run in the reactor thread.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_threads.py