Hacker News new | ask | show | jobs
by joowani 2749 days ago
This is cool. By the way I just tried it and ran a simple infinite loop (in Python) and the whole page goes unresponsive and I don't seem to have a way to terminate the process?
2 comments

So it's not the loop -- it's the printing of a lot of data really fast. Here's an infinite loop with a small sleep with no issue in it: https://repl.it/@amasad/forever

It's funny, it's both a regression and an improvement. We started using XTerm.js with a PTY[1] and we stopped throttling output[2] which reintroduces the "browser locking up from too much output" bug. We'll need to introduce backpressure.

[1]: https://repl.it/site/blog/stderr

[2]: https://repl.it/site/blog/infinite-loops

Works for me in Firefox. Doesn't lock up, just gets a bit less responsive, but I can still press the stop button and it reacts fairly quickly.