Overview
...
void myScript.ThrowIfCancelled()
...
This method is useful when you want to check the current transaction is cancelled canceled and abort the current operation.
...
Code Block | ||
---|---|---|
| ||
function longRunningMethod() { var isCompleted = false; while(!isCompleted) { isCompleted = SomethingRunningLongTime(); // break if cancelled Script.ThrowIfCancelled(); } } |