can hang if opposite side exits, but it's only basic test
| 82 | |
| 83 | // can hang if opposite side exits, but it's only basic test |
| 84 | static void WaitForRecv(TIBBufferPool* bp, TPtrArg<TComplectionQueue> cq, ibv_wc* wc) { |
| 85 | for (;;) { |
| 86 | if (cq->Poll(wc, 1) == 1) { |
| 87 | if (wc->opcode & IBV_WC_RECV) { |
| 88 | break; |
| 89 | } |
| 90 | bp->FreeBuf(wc->wr_id); |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | void RunIBTest(bool isClient, const char* serverName) { |
| 96 | TIntrusivePtr<TIBPort> port = GetIBDevice(); |