how to get TIMEOUT state from waitset.timedWait? #2312
-
hi, i am new to C++17. I am studying the request response example client_cxx_waitset.cpp.
I want to know how to get the TIMEOUT state from waitset.timedWait? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @leiBravo The timeout state is an empty if(notificationVector.empty()) {
std::cout << "The WaitSet timed out before notifications arrived" << std::endl;
} |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer, but I have already try this way, it’s doesn’t work, the size of vector can not indicate TIMEOUT
…---- Replied Message ----
| From | Mathias ***@***.***> |
| Date | 07/05/2024 18:42 |
| To | eclipse-iceoryx/iceoryx ***@***.***> |
| Cc | leiBravo ***@***.***>,
Mention ***@***.***> |
| Subject | Re: [eclipse-iceoryx/iceoryx] how to get TIMEOUT state from waitset.timedWait? (Discussion #2312) |
Hi @leiBravo
The timeout state is an empty notificationVector :)
if(notificationVector.empty()) {
std::cout << "The WaitSet timed out before notifications arrived" << std::endl;
}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@elBoberido I have re-modified the test code, notificationVector.empty() is work. thanks |
Beta Was this translation helpful? Give feedback.
Hi @leiBravo
The timeout state is an empty
notificationVector
:)