def test_basic_send(self): i = IOWorker() i.send("foo") self.assertTrue(i._ready_to_send) self.assertEqual(i.send_buf, "foo") i._consume_send_buf(3) self.assertFalse(i._ready_to_send)
def send(self, data): if threading.current_thread( ).name != "MainThread" and threading.current_thread( ).name != "BackgroundIOThread": raise RuntimeError("Wrong thread: %s" % threading.current_thread()) """ send data from the client side. fire and forget. """ return IOWorker.send(self, data)
def send(self, data): if threading.current_thread().name != "MainThread" and threading.current_thread().name != "BackgroundIOThread": raise RuntimeError("Wrong thread: %s" % threading.current_thread()) """ send data from the client side. fire and forget. """ return IOWorker.send(self, data)
def send(self, data): """ send data from the client side. fire and forget. """ return IOWorker.send(self, data)