View Single Post
11/03/21, 09:36 AM   #1
Psiioniic
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 18
Async computation question

Hi,

I'm not experienced in async computations in lua, so sorry for my probably stupid questions.

I want to run a computation which depending on the case might take considerable amount of time, maybe hundreds of ms or even a second, but I don't want the game/ui to freeze or lag during this time.

I found this thread from 2018 recommending libAsync
https://www.esoui.com/forums/showthread.php?t=7891

So do I understand correctly that I have to partition my task in multiple steps, making each step so small that it fits in a single frame (even on a low end machine) and then use
function task:For(from, to, step): Do(someFunction)
from libAsync?

Are there any other alternatives? e.g. ones which work more like threads, (to allow having the loop inside the user function)?
  Reply With Quote