Waiting for coroutines to complete before releasing caller script context I have some questions regarding the coroutines addon. I've got a script console, and if i execute a script in it that creates a coroutine, I want to wait until the coroutine is done running before I release the script context, but I do not see how to do that. It seems the 'thread' information exists only inside CContextMgr, and I have no way of figuring out if the main script context spawned new script contexts, and which if any those are. I was thinking I could just create new contexts, and have CContextMgr release them automatically (keepCtx = false), but then I cannot Release the script function that contains the running code. Is there any way to accomplish this without writing my own coroutine system? https://ift.tt/eA8V8J
I have some questions regarding the coroutines addon. I've got a script console, and if i execute a script in it that creates a coroutine, I want to wait until the coroutine is done running before I release the script context, but I do not see how to do that. It seems the 'thread' information exists only inside CContextMgr, and I have no way of figuring out if the main script context spawned new script contexts, and which if any those are. I was thinking I could just create new contexts, and have CContextMgr release them automatically (keepCtx = false), but then I cannot Release the script function that contains the running code. Is there any way to accomplish this without writing my own coroutine system?
from GameDev.net http://bit.ly/2WjANBU
from GameDev.net http://bit.ly/2WjANBU
ليست هناك تعليقات