I want to seperate thread on the page to prevent freezing of gui. For this, I am running the function which will freeze gui inside another thread with setTimeout but still freez
Javascript is not multithreaded, you may want to look at Web Workers