lua-users home
lua-l archive

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


on 10/24/04 9:10 AM, Edgar Toernig at froese@gmx.de wrote:

> Are Lua-only coroutines really required?  Small survey?
> - Who is using them at the moment?
> - Are the Lua-only couroutines good enough for you?
> - Would you switch to C-level coroutines if they were
> available?

When building an iterator as a coroutine, it might be nice to avoid
allocating a new C stack if it weren't needed. C stacks are probably
expensive to allocate (particularly if they get overflow detection) and
difficult to size.

This is not to say that I don't want C coroutines. Just that I can see the
downsides to using them in some cases.

I also think that if Lua-only coroutines are preserved, it would be
worthwhile to try to make pcall coroutine friendly, probably by providing
more explicit support in the VM.

Mark