#NEWLINE# def test_callFromThread( self ) : #NEWLINE# #INDENT# '\n        A function scheduled with L{IReactorThreads.callFromThread} invoked\n        from another thread is run in the reactor thread.\n        ' #NEWLINE# reactor = self . buildReactor ( ) #NEWLINE# result = [ ] #NEWLINE# def threadCall( ) : #NEWLINE# #INDENT# result . append ( threading . currentThread ( ) ) #NEWLINE# reactor . stop ( ) #NEWLINE# #UNINDENT# reactor . callLater ( 0 , reactor . callInThread , reactor . callFromThread , threadCall ) #NEWLINE# self . runReactor ( reactor , 5 ) #NEWLINE# self . assertEquals ( threadCall , [ threading . currentThread ( ) ] )