Trigger more than one infinite loop

I’m trying to trigger more than one infinite loop, without patterns (don’t ask why).
I don’t want to do it manually. Trying with routines, tdef, functions.
i would like to iterate n times something like:

5.do {
  function that creates an infinite loop, // code always stops at first iteration
} 
(
5.do{
	arg i;
	Routine{
		inf.do{
			arg j;
			"routine % is on iteration %".format(i,j).postln;
			0.1.wait;
		};
	}.play;
}
)

Hi @loopgo,

Putting an inf.do inside of a routine will give you an infinite loop, so starting 5 routines should do this for you. Notice the .wait, otherwise you’ll hang sclang!

1 Like