my goal is to continue with the execution of method (x), when another independent method (y) is called. At the moment I am using a user defined attribut (type bollean) which is changed to true, when method (y) is called. With this procedure I am able to continue at a certain point with method (x).
My question: I am curious if there is a better way to see with method (x) if method (y) is called? My current procedure is more like a workaround...
Thanks in advance!
Solved! Go to Solution.
What is the specific background for suspending the method(x) ,whilst execution, to wait for another method(y)to start execution ?
I agree with @simulator, I don't yet see a need to do what you want to do. Why not split your "waiting" method into 2 methods and the 2nd method is called from the other method?
However, you can waituntil a user-defined attribute turns TRUE, but unfortunately that attribute cannot belong to a method, because then you would have to use the &/ref operator in the waituntil statement. A workaround could be like in the attached example model (specific user-attribute of type boolean for the "other" method, e.g. on a network or on the "waiting" method itself --> then you could use self.~.mFinish_wasCalled).