[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [c api] Finding coroutine "parent"
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Wed, 8 Jul 2009 19:59:03 +0200
> I wonder if there is a way to determine the "parent" lua_State
> of a coroutine, given its own lua_State. In other words, I am
> trying to find the lua_State a given coroutine has been created
> Is it possible ?
> For the moment I am stuck.
It is not possible. A coroutine "A" can create a coroutine "B", pass
it to a coroutine "C", and terminate. "A" was the creator of "B", but
it no longer exists. There is no coroutine ownership mechanism,
coroutines are garbage collected objects like tables or functions.