Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
function longRunningMethod() {

    var isCompleted = false;


   while(!isCompleted) {

      isCompleted = SomethingRunningLongTime();
   

    // break if cancelled
    Script.ThrowIfCancelled();
   

  }

}