1. Hi everyone,

    I have an issue with my addon: It performs kind of long calculations. Whenever this calculation is triggered, WOW freezes which is not really nice. Is there a way to perform these calculations in background? Or in a parallel thread? Any other ideas are also welcome ;-)

    Thanks in advance!

    There's only one thread, so no. You can use coroutines, which are a bit like pseudo-threads. See this thread and this snippet for examples.

    Nice, thank you! It seems that I have searched for the wrong tags in the past... It works perfekt.

    Just one more thing to understand the behavior: What happens when coroutine.resume(...) is called, but the coroutine is not yielded yet? I guess this could happen when you chose the throttle value too low. Would this mean that the coroutine is just resumed right away when the yield command comes, i.e. behavior just without the coroutine, or will the resume command just have an effect when the coroutine is yielded?

    Thanks again!

    Nice, thank you! It seems that I have searched for the wrong tags in the past... It works perfekt.

    Just one more thing to understand the behavior: What happens when coroutine.resume(...) is called, but the coroutine is not yielded yet? I guess this could happen when you chose the throttle value too low. Would this mean that the coroutine is just resumed right away when the yield command comes, i.e. behavior just without the coroutine, or will the resume command just have an effect when the coroutine is yielded?

    Thanks again!

    That cannot ever happen. The user interface is a single thread. Either the OnUpdate handler is running, or the function is running.