-
I'm glad you can see my little question. While reading the StateManagement section of the code, I found that there is a variable of type std:: sharedfuture in the StateClient class that indicates whether the functional group setting request was successfully processed (if there are any unprocessed requests, an error will be thrown).In my understanding, the Setstate function of this class is the key to sending requests to EM. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
I roughly understand what you mean. Does mSetStateFuture need to be set to empty by the caller? But this is a private member variable, so how can it be changed? In other words, how should the actual code be executed to ensure that the condition if (mSetStateFuture.valid()) is always false? |
Beta Was this translation helpful? Give feedback.
The responsibility is at the callee (StateClient) side and not the caller (SM) side (if you are thinking about which responsibility, then read my previous response again). That is why
mSetStateFuture
is private and that is why I said previously:Besides that, the idea of that:
is not correct because if the future is valid, it means the StateClient should first cancel the previous request and inform this cancellation to the callers. And then it should process the new state. Invalid
mSetStateFuture
means nobody calledSetState
. So, after the first call,mSetStateFuture
…