Disable world saves while loop is running?

I havent really had any issues yet, but I cant imagine saving while in the middle of handling an array, is a good thing.

Is there a way to prevent the saving while a loop is running and then on complete, re-enable?

This maybe?