Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 139713

Stop a function running from ANOTHER function in JavaScript

$
0
0

What I want to do is stop a function running from ANOTHER function (in JavaScript). here is an example of what I would like to do:

async function process1(){ //this is a normal function running
     //here is a long list of instruction that can take some time (~ 30s)
}

function STOPprocess1(){
  process1().Stop; //this is pseudoCode !
}

When I call STOPprocess1() , I want the process1 function to stop running.


Viewing all articles
Browse latest Browse all 139713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>