Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #36383

Re: Asynchronous Loops in the Browser?

Path csiph.com!goblin3!goblin1!goblin.stu.neva.ru!news.space.net!news.m-online.net!news.bgeserver.de!bgepartei.de!news2.open-news-network.org!.POSTED.34.227.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Asynchronous Loops in the Browser?
Date Mon, 22 Apr 2019 02:42:04 +0200
Organization PointedEars Software (PES)
Message-ID <7e83b9a2-e302-91b9-e1ec-70e73f60c8ff@PointedEars.de> (permalink)
References <loop-20190421161414@ram.dialup.fu-berlin.de>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info news2.open-news-network.org; posting-host="34.227.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch:178.197.227.34"; logging-data="23786"; mail-complaints-to="abuse@bgeserver.de"
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
In-Reply-To <loop-20190421161414@ram.dialup.fu-berlin.de>
Content-Language en-US
Xref csiph.com comp.lang.javascript:36383

Show key headers only | View raw


Stefan Ram wrote:
> |>> print(1)
> |<- 1
> |>> while(1);
>
>   offering me a new prompt.

No, it does not, for the Console tab is stuck then.

> But the endless loop still seems to be running in some kind of background?

JFTR:

Stefan Ram is a known Usenet troll.  All he ever does is starting new
threads and posting his absurd, clueless theses; he never actually studies
the subject before he is posting about it, or engages in a discussion.
Do not feed the troll.

In this case, however, I must react to this because the code that he posts
is positively harmful.  In Firefox ESR 52.9.0 (64-bit) on GNU/Linux, such a
tight loop drives CPU usage to 100 %, thus drives the CPU fan up, and can
cause the CPU to overheat.  Only sometimes there is a message warning about
an unresponsive process in which the “Stop Script” button can be used to
terminate it.

>   So, is everything I enter into the browser console
>   executed in its own thread?
> 
>   If so, where/how can I see and stop those threads?

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).

In Chromium-based browsers, where each tab is executed as a separate
process, it suffices to close or kill the tab (via the Chromium Task
Manager, triggered also with Shift+Esc, or via the Task Manager of
the desktop environment [e.g. KRunner triggered by Ctrl+Esc by default,
or KSysGuard] or operating system [e.g. top(1)]).

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: Asynchronous Loops in the Browser? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-04-22 02:42 +0200
  Re: Asynchronous Loops in the Browser? Luuk <luuk@invalid.lan> - 2019-04-22 08:54 +0200
  Re: Asynchronous Loops in the Browser? Luuk <luuk@invalid.lan> - 2019-04-22 08:54 +0200
  Re: Asynchronous Loops in the Browser? Luuk <luuk@invalid.lan> - 2019-04-22 08:55 +0200
  Re: Asynchronous Loops in the Browser? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-04-22 11:13 +0100
    Re: Asynchronous Loops in the Browser? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-04-22 12:20 +0200
    Re: Asynchronous Loops in the Browser? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-04-22 12:53 +0200
      Re: Asynchronous Loops in the Browser? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-04-22 17:05 +0100
        Re: Asynchronous Loops in the Browser? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-04-22 19:19 +0200
          Re: Asynchronous Loops in the Browser? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-04-22 23:49 +0100
            Re: Asynchronous Loops in the Browser? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-04-23 11:58 +0200

csiph-web