lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On 11/08/14 07:06 PM, Jay Carlson wrote:

On Aug 11, 2014 1:48 PM, "Thiago L." <fakedme@gmail.com> wrote:

> On 11/08/14 02:34 PM, Jay Carlson wrote:

>> Why do people like MediaWiki disable coroutines, anyway?
>
> Because you can't interrupt running coroutines?
>
> coroutine.resume(coroutine.create(function() while true do end end)) -- good luck interrupting me

OK, that's a good reason. (OTOH, if you were going to tear down the runtime in response to an interrupt I'm not sure it matters.)

You can navigate from a lua_State to its global state, but you can't navigate from the global state to the current thread. I'm not certain what "current thread" really means anyway.

So you want the "thread stack" (w/e it's called) to be a doubly-linked list? If so I want that too...
And debug.* should have access to it...

Jay