def _failure(self, reason, tc):
        """Called from the net thread. Appends a ThreadCommand
        failure callback to the gui thread's queue"""
        if tc.param:
            evt = ResponseEvent(tc.onFailure, None, None, tc.param, reason)
        else:
            evt = ResponseEvent(tc.onFailure, None, None, reason)
        self.app.AddPendingEvent(evt)
Called from the net thread. Appends a ThreadCommand
        failure callback to the gui thread's queue
recipes/Python/286201_wx_twisted_support_using_threads/recipe-286201.py