[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Problem with coroutine.running?
- From: Nick Gammon <nick@...>
- Date: Mon, 4 Sep 2006 10:59:03 +1000
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