def METHOD_NAME(self):
    latch = mitogen.core.Latch()
    wait_recv = mitogen.core.Receiver(self.router)
    t = threading.Thread(target=lambda: self.wait(latch, wait_recv))
    t.start()
    sender = wait_recv.to_sender()
    sender.close()
    def throw():
        raise latch.get()
    t.join()
    e = self.assertRaises(mitogen.core.ChannelError, throw)
    self.assertEqual(e.args[0], sender.explicit_close_msg)