Best way to stop nested Routine

Hello dear List!

I’m wondering what’s the best or “safest” way to stop a nested Routine, I’m finding that calling .stop is not 100% reliable.

~routineCH = Routine{ {
“do something”

~routineP = Routine{{
“something else”;
“something else”

Many thanks in advance!!

oops, I was resetting before the child routine was over, therefore it kept on going…

Hello dear list,
Is this normal behaviour?
What if I have a Routine that may last anywhere between 10 and 40 seconds, and I need to reset it, and start it again in say 20 seconds. Then it might have or might have not been finished, hmm

I just switched to using Tasks , stop - resume

I recommend having a look at Pspawner, it’s super flexible and elegant for nested sequencing.

1 Like

Thank you Daniel! Yes Pspawner is the way to go,