[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A Question of Style
- From: Sean Conner <sean@...>
- Date: Wed, 7 Dec 2011 11:23:19 -0500
It was thus said that the Great Enrico Colombini once stated:
> On 07/12/2011 7.49, Sean Conner wrote:
> >It was thus said that the Great Brian Maher once stated:
> >>On the issue of calling Lua functions from C, you might want to avoid
> >>doing that since it prevents the default Lua from working properly
> >>with coroutines.
> >
> > How so? I wrote a framework (that I need to put up somewhere) that
> > works
> >fine with coroutines. In fact, it launches a new Lua coroutine everytime a
> >new TCP connection is made, with each Lua "thread" handling a connection
> >and
> >it's driven completely from C.
>
> I guess there must be some precondition on Sean's statement; I too wrote
> a framework where C(++) game events launched Lua coroutines, which could
> call C(++) back, which in turn could ask them to suspend until a given
> C(++) event or condition, and I encountered no problems.
I think you meant Brian's statement. I'm in violent agreement with you.
-spc