lua-users home
lua-l archive

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


I see. thanks Mike!
(and sorry, I did not write precise version number of lua(5.1.4) and coco(1.1.6))

2010/4/19 Mike Pall <mikelu-1004@mike.de>
In any case, 10K+ coroutines are not the best use case for Coco.
While it's convenient to be able to yield and resume to C code,
the C stacks are rather costly. You might be better off in the
long term to convert to non-blocking C functions and wrap some Lua
code around them which does the yield instead.

because my framework needs to yield lua execution inside metamethod to provide similar feature like lua-RPC(http://q12.org/lua/index.html) but more asynchronous. if there is way to yield inside metamethod and less memory overhead,  I should use it. but currently (as long as my investigation) I need to rely on lua+coco patch.

Takehiro Iyatomi(弥富 豪宏)
mail: iyatomi@gmail.com
twitter: http://twitter.com/umegaya