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
Post a Comment