The documentation seems to provide no details beyond that yielding is handled for you. However, I have noticed odd behavior. For example, I counter I have as a global variable that gets incremented in my map stage will get reset whenever the script yields.
So when the script yields, do I loose everything in memory? Or am I running a poor test or misunderstanding something?
If I’m right, what’s the best way to deal with this? The best I can think of is to check how much governance is left and try to save everything to the cache or a custom record and resume it when the script starts again. That sounds like a terrible thing to have to do however.
This is a cached copy. Click here to see the original post.