def test_callFromThread(self):
        def cb(ign):
            firedByReactorThread = defer.Deferred()
            firedByOtherThread = defer.Deferred()

            def threadedFunc():
                reactor.callFromThread(firedByOtherThread.callback, None)

            reactor.callInThread(threadedFunc)
            reactor.callFromThread(firedByReactorThread.callback, None)

            return defer.DeferredList(
                [firedByReactorThread, firedByOtherThread],
                fireOnOneErrback=True)
        return self._waitForThread().addCallback(cb)
Patch information in a source space
dataset/ETHPy150Open twisted/twisted/twisted/test/test_threads.py/ReactorThreadsTests.test_callFromThread--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/source_space.py/_add_patch_info