Hi Aleksander
You are correct that each custom panel has a single shared thread for ogscript.asyncExec.
Recognizing that there may be a need to run several tasks like this, we have added the ability to create additional asyncExec threads with:
var executor = ogscript.createAsyncExec('ASYNC_EXEC_ID'); //ONLY USED TO CREATE NEW
and
var executor = ogscript.getAsyncExecById('ASYNC_EXEC_ID'); //USED TO GET ONCE CREATED
Once you have your executor object, you can essentially use it like the ogscript.asyncExec:
executor.asyncExec(function, delay);
We've also given it more advanced features such as taking/releasing locks, waiting for work, etc. But, if your goal is to start with simply having more asyncExec threads, this will get you what you want.
#DashBoard