| 500 |
| 501 |
| 502 |
| 503 |
| 504 |
| 505 |
| 506 |
| 507 |
| 508 |
| 509 |
| 510 |
| 511 | |
def test_threads(): |
gw = py.execnet.PopenGateway() |
gw.remote_init_threads(3) |
c1 = gw.remote_exec("channel.send(channel.receive())") |
c2 = gw.remote_exec("channel.send(channel.receive())") |
-> c2.send(1) |
res = c2.receive() |
assert res == 1 |
c1.send(42) |
res = c1.receive() |
assert res == 42 |
gw.exit() | |