heylch commented on code in PR #307:
URL: https://github.com/apache/incubator-livy/pull/307#discussion_r1496666827
##########
repl/src/main/scala/org/apache/livy/repl/AbstractSparkInterpreter.scala:
##########
@@ -349,4 +355,10 @@ abstract class AbstractSparkInterpreter extends
Interpreter with Logging {
output
}
+
+ override def cancel(): Unit = {
+ if (currentThread != null) {
+ currentThread.interrupt()
Review Comment:
interrupt cannot terminate the running task. This can resolve the problem of
`Thread.sleep(xxx)`, but it won't help for long running task like `while(true):
xxx`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]