ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   [outdated] defer function (https://www.esoui.com/forums/showthread.php?t=8153)

sirinsidiator 11/13/18 09:35 AM

[outdated] defer function
 
Quite often I find myself wanting to run code right after the current function ended, but without unnecessary delay. Usually I would use zo_callLater(myFunc, 0) to do this, but this would wait for the next frame to begin. For example when I put a function into a queue and it can actually be executed right away, but the code that places it in the queue has to finish first.

For this reason I'd like to see a new function "defer(myFunc)" which calls the passed function immediately after the current callstack is over with zero delay.

Here's a picture that should clarify what I mean:


All times are GMT -6. The time now is 01:42 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI