2

I have a groovy script file, that I run with GroovyShell. How to stop executing of script? I tried put it in new thread and later interrupt thread but it does not work.

yu.pitomets
  • 1,660
  • 2
  • 17
  • 44

1 Answers1

1

There is another question here from last year asking a similar thing:

Stopping the execution of a Groovy script

There is also a ThreadInterrupt AST transform which may help. Also, see the TimedInterrupt transform

Community
  • 1
  • 1
tim_yates
  • 167,322
  • 27
  • 342
  • 338