05-02-2015, 04:27 PM
I think I see one huge problem with this - object lifetime. If a plugin yields while it has any cEntity / ... objects, those are not guaranteed to be valid after it is resumed. We'd have to first fix this and then it would be possible to yield out of functions.
Also I'm still not sure how this would work with for example hook callbacks - if we yield out of it, when is the callback going to finish?
I admit that the concept of coroutines still eludes me in its full, so I'm a bit worried about everything.
Also I'm still not sure how this would work with for example hook callbacks - if we yield out of it, when is the callback going to finish?
I admit that the concept of coroutines still eludes me in its full, so I'm a bit worried about everything.