Thread *new
:
*new { arg func, stackSize = (512);
...
}
But the reality is that infinite recursion uses up all available system memory, until it goes into swap, and the whole system becomes unresponsive, forcing a hard shutdown and reboot.
If the stack size really is 512, then 16 GB on my system / 512 frames = 32 MB per frame, this doesn’t seem like a realistic estimate. So the more likely explanation is that we “say” there’s a stack size limit but then ignore it.
… which is unwise, isn’t it?
Surely we can put something in the interpreter to say, if we’ve blown past the declared stack limit, just stop evaluating…? (Why do we not do this already?)
hjh