Button for pausing a cell?

Sometimes it might make sense to have a cell which runs a generator continuously and does some expensive computation, or draws something, or …

It seems like once such a cell is started, it just keeps going indefinitely, burning CPU, drawing over itself, or whatever.

It might be neat if such a cell could be paused via a button, instead of only via leaving the tab.

1 Like

There’s a related previous thread on this topic, but here’s a minimal example of pausing a generator:


1 Like

Yeah, it can clearly be done by adding extra cells with user inputs. I wonder if it might turn out to be a frequent enough goal that sticking a standard UI in the corner might be a useful feature. Maybe premature to worry about at the moment though.

1 Like

I’d even take it a step further and suggest adding a global notebook pause button since I’ve seen many notebooks with generators that just run to infinity and beyond.