Skip to content

Commit

Permalink
Use Yield function (to reduce latency)
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius committed Dec 7, 2023
1 parent f868ca3 commit 7b3bf76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TSimpleTask Client(Poller& poller, TAddress addr) {
try {
while ((line = co_await lineReader.Read())) {
while (inflight >= maxInflight) {
co_await poller.Sleep(std::chrono::milliseconds(0));
co_await poller.Yield();
}

inflight++;
Expand Down
2 changes: 1 addition & 1 deletion coroio

0 comments on commit 7b3bf76

Please sign in to comment.