Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,12 @@ TEST(RuntimeQueueDispatch, TimeoutDoesNotDispatchQueuedRequestsOfBatch) {
// owner and frees its dispatch window slot; a refill would submit the
// queued owner of the same batch unless it has already been canceled.
std::atomic<int> polls{0};
const auto waiter_thread_id = std::this_thread::get_id();
auto fake_rdma = std::make_shared<FakeTransport>(
RDMA, [&polls](const Request& request, int) {
RDMA, [&polls, waiter_thread_id](const Request& request, int) {
if (std::this_thread::get_id() != waiter_thread_id) {
return TransferStatus{TransferStatusEnum::PENDING, 0};
}
if (++polls == 1) {
std::this_thread::sleep_for(std::chrono::milliseconds(5));
return TransferStatus{TransferStatusEnum::PENDING, 0};
Expand Down
Loading