mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-13 22:18:36 +08:00
sleep
Signed-off-by: zhengd-nv <200704041+zhengd-nv@users.noreply.github.com>
This commit is contained in:
parent
0c51a45224
commit
a16f684e11
@ -98,13 +98,14 @@ TransferState MooncakeTransferStatus::wait(int64_t timeout_ms) const
|
||||
mBatchFreed = true;
|
||||
TLLM_LOG_DEBUG("Batch ID %lu freed in wait()", mBatchId);
|
||||
syncSegmentCache(mEngine);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
return TransferState::kSUCCESS;
|
||||
}
|
||||
|
||||
// If timeout_ms < 0, wait indefinitely
|
||||
if (timeout_ms < 0)
|
||||
{
|
||||
std::this_thread::yield();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -117,7 +118,7 @@ TransferState MooncakeTransferStatus::wait(int64_t timeout_ms) const
|
||||
return TransferState::kIN_PROGRESS;
|
||||
}
|
||||
|
||||
std::this_thread::yield();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user