Skip to content

Check waitForStateUpdate Mechanism #363

@amock

Description

@amock

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions