I find concurrency (and threading) concepts in Lua fun and all, but these topics seem to ignore practical issues for academic, historical, or theoretical ones.<p>I use Lua a lot, but the global interpreter lock or lua_lock/lua_unlock implementation detail is one I don't see people talk too much about.<p>It's particularly frustrating when you want to do something advanced, like pull in an FFI for Lua, but also implement GIL behavior.<p>I haven't ever seen someone implement this correctly. I think it should be easy in theory, but I haven't given it a go in a while.<p>The current state of things is, you can use LuaJIT and accept no thread safety, or use PUC-Rio Lua with a custom lua_open/lua_lock implementation and use the FFI library separately. I haven't actually seen anyone do the latter. So in the field, it's all an untested concept, I think.<p>Maybe someone out there is doing this today and not talking about it. But there's no open source solution. Lua Lanes doesn't address this concern, and stylistic adaptions of cooperative multitasking don't either.<p>I realize it's technically a different topic, but it's basically the same area of concern.<p>Except, well, I find there to be fewer practical use cases for cooperative multitasking versus preemptive.