[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: interrupting coroutines (was Re: Local Variables)
- From: Sean Conner <sean@...>
- Date: Mon, 11 Aug 2014 19:54:35 -0400
It was thus said that the Great Jay Carlson once stated:
> 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.
Um ... lua_pushthread()?
And by "current thread" read "currently running Lua coroutine".
-spc