MCPcopy Index your code
hub / github.com/python/cpython / test_send_blocking_waiting

Method test_send_blocking_waiting

Lib/test/test__interpchannels.py:857–871  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

855 return wait
856
857 def test_send_blocking_waiting(self):
858 received = None
859 obj = b'spam'
860 wait = self.build_send_waiter(obj)
861 cid = _channels.create(REPLACE)
862 def f():
863 nonlocal received
864 wait()
865 received = recv_wait(cid)
866 t = threading.Thread(target=f)
867 t.start()
868 _channels.send(cid, obj, blocking=True)
869 t.join()
870
871 self.assertEqual(received, obj)
872
873 def test_send_buffer_blocking_waiting(self):
874 received = None

Callers

nothing calls this directly

Calls 6

build_send_waiterMethod · 0.95
startMethod · 0.95
joinMethod · 0.95
createMethod · 0.45
sendMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected