()
| 188 | ev2.set() |
| 189 | |
| 190 | def unblocker(): |
| 191 | # If test doesn't pass, wake up the socket again to avoid hanging forever |
| 192 | if not ev3.wait(0.5): |
| 193 | assert port |
| 194 | with socket.create_connection(("127.0.0.1", port)): |
| 195 | pass |
| 196 | |
| 197 | t1 = spawn(writer) |
| 198 | t2 = spawn(unblocker) |