lua-users home
lua-l archive

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


The documentation for coroutine.running says this:

"Returns the running coroutine, or nil when called by the main thread."



But it doesn't actually do that. For example:



type (coroutine.running ()) --> bad argument #1 to 'type' (value expected)



Looking at the code, it actually returns no value, when called by the main thread.



I suggest that either the code does a "lua_pushnil" or the documentation be amended.



- Nick Gammon