vatlab / sos-notebook

Multi-language Jupyter Notebook
http://vatlab.github.io/SoS
BSD 3-Clause "New" or "Revised" License
176 stars 17 forks source link

how to interrupt a sub kernel? #284

Closed kundeng closed 4 years ago

kundeng commented 4 years ago

Can't find a way to interrupt the sub-kernel.

BoPeng commented 4 years ago

SoS receives the interruption signal and kills all subkernels and itself... which is what "interruption a Jupyter kernel" generally means. It might make sense to interrupt only the subkernel if a subkernel is running, and interrupt itself otherwise. In general the behavior is not well-defined though.

BoPeng commented 4 years ago

Note that if the kernel is not running, you can use magic %shutdown --restart R etc to restart a subkernel.

BoPeng commented 4 years ago

This is the current behavior. Namely, when the Python3 is in a dead loop, you do Kernel -> Interrupt Kernel, and the Python3 kernel will be killed, but SoS will continue running.

image

BoPeng commented 4 years ago

I think the problem here is that it is not easy to determine if sos or one of its subkernels is being interrupted.