Replies: 3 comments 3 replies
|
The sleep_for function blocks current thread, that's not a good operation. please use some async timer instead. such as the loop->runAfter() method or the sleepCoro coroutine. |
0 replies
|
@an-tao Thank you for the response. We are using C++17 so I looked into the loop->runAfter() only thing is let's say we do app().getLoop()->runAfter(5, { /* some ops */}); |
3 replies
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, Currently I have a function "A" which waits using this_thread:sleep_for(..) until some condition is met. And I am calling the function "A" inside the http post request before sending the response. Is this correct way or there is some other way to wait for this function?
I am also using C++17
All reactions