Limit on number of Generators?

I’m about to make some extensions to my code that could result in it running multiple generators simultaneously (well, interleaved but still concurrent in memory). Is there any limit to the number (in the agent) that I could run? I’ve been running to a max of about 5-6 so far, but didn’t want to explicitly put too low a limit on it.

Each generator will be an instance of the same function. Can I assume that the resources used will only be that required to save the context (ie local variables)?

There’s no limits on generator numbers, either in devices or agents, except for the memory they take up. That memory consists of the stack frame of the generator function, so yes all the local variables. But as always you don’t have to “assume” anything about what memory is taken up: you can keep track by using imp.getmemoryfree().

Peter