Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Asynchronous Loops in the Browser? Date: Mon, 22 Apr 2019 11:13:08 +0100 Organization: A noiseless patient Spider Lines: 29 Message-ID: <8736ma1h6z.fsf@bsb.me.uk> References: <7e83b9a2-e302-91b9-e1ec-70e73f60c8ff@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="a7f200796ec238d15fa0373559060d39"; logging-data="18050"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199eFJjAXIN+5u0ligaP3E48cIHv7setfg=" Cancel-Lock: sha1:b/W+Zhh0llPfQ+55rt/DdMEb5W4= sha1:jZrEQgLz9IQG53SVNdKLu1h4tXo= X-BSB-Auth: 1.6bdf03650cf2e8e5d34e.20190422111308BST.8736ma1h6z.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:36388 Thomas 'PointedEars' Lahn writes: > Stefan Ram wrote: >> |>> print(1) >> |<- 1 >> |>> while(1); >> >> offering me a new prompt. > > No, it does not, for the Console tab is stuck then. No doubt that sometimes happens, but the behaviour (for the 'while') described by Stefan Ram is also a possibility. It's what I see in the three Linux browsers I tested. > In Firefox, where there is only one process, the only way to solve the > problem (if the warning message does not appear) is to kill the browser > process (e.g., Ctrl+Alt+Esc, then click with the death pointer, in the > X Window System). When I try it with Firefox, I get (as SR suggested) a fresh and responsive console prompt, and I can simply close the browser normally and the CPU usage goes back to idle. What one sees, and how to deal with it, is obviously system-dependent. -- Ben.