Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right, it just needs a sufficiently powerful C API and internals designed with coroutines in mind. ("just" sounds out of place, there...)

If you want to look at the Lua coroutine implementation, start at auxresume (http://www.lua.org/source/5.1/lbaselib.c.html#auxresume) in lbaselib.c, and the functions tagged luaB_ more generally. (In 5.2, they've been moved to their own file, lcorolib.c.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: