Hi,
I have one question that I couldn’t find answer for.
I am trying to check when the sequence is over, and I’m trying the following example code:
bool test = false;
this->runAction(
Sequence::create(
DelayTime::create(5),
CallFunc::create([&test]() {test = true; }),
nullptr));
while (!test);
And the variable test is never changing to true so the execution is stuck at while (!test);
When I delete the while loop the variable test is changing to true after some time but with the loop is simply stuck.
Do I miss something ???
Is there other more elegant way of stopping the execution of the main thread until the sequence is over ?
Thanks in advance 