Watch the state of a Routine from outside

So I’ve looked again at this… it works as described.

(
~condvar = CondVar();
~wave_routine_gen = {
	arg stream_count, drop_count, fund, freq_grow, init_dur, dur_grow;
	Routine({
		~condvar.wait;
		~overtone_gen.reset;
		stream_count.do {
			\waves.postln;
			1.wait;
		};
		~condvar.signalOne;
	})
};
~drop_routine_gen = {
	arg stream_count, drop_count, fund, freq_grow, init_dur, dur_grow,
	att, rel;
	Routine {
		~condvar.wait;
		~overtone_gen.reset;
		stream_count.do {
			\drop.postln;
			1.wait;
		};
		~condvar.signalOne;
	}
};
)

(
Routine {
	~drop_routine_gen.(2, 10, 100, 1.2, 1, 0.8, 0.01, 0.1).play;
	~wave_routine_gen.(2, 10, 300, 1.34, 2, 0.7).play;
}.play
)

~condvar.signalOne

returning…

drop
drop
waves
waves

The thing is, these always are evaluated in the order you define them in the bottom Routine, so you probably ought to use another method and make that static structure clear.

What do you mean by arbitrary? That word could apply to many different things here. Do you mean, you want them to be evaluated in a random order? not in the order they were added?

Since these always evaluate in order I think this might already be a queue of sorts under the hood.