We encountered some problems in #361 related to the function waitForStateUpdate. It observes what the concurrency thread is doing. However, when the thread finished before waitForStateUpdate was called, the function returned unexpected results according to the tests. I assume this situation was never intended to occur.
Some quick ideas on how to fix this:
- Introduce some kind of promise/future mechanism to properly wait for the result from outside the thread.
- For state changes, we could also pass event callbacks as
std::function.
We should also review the code to determine whether such an observer is actually required at this point, or whether we can reduce complexity by removing it altogether.
We encountered some problems in #361 related to the function
waitForStateUpdate. It observes what the concurrency thread is doing. However, when the thread finished beforewaitForStateUpdatewas called, the function returned unexpected results according to the tests. I assume this situation was never intended to occur.Some quick ideas on how to fix this:
std::function.We should also review the code to determine whether such an observer is actually required at this point, or whether we can reduce complexity by removing it altogether.