Killing a JavaScript function which runs infinite -



Killing a JavaScript function which runs infinite -

as example

var runinfinite = function(){ while(1) { // stuff; } }; settimeout(runinfinite, 0);

is possible break runinfinite function form running infinite? mean possible kill function function without using flag or homecoming statement?

the reply no. since javascript single-threaded ( unless using less mutual implementation uncertainty ) nil can break loop ( or other block of code ) outside.

javascript javascript-events

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -