lua-users home
lua-l archive

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

On Sat, May 6, 2017 at 01:18 Dirk Laurie <> wrote:
2017-05-05 23:27 GMT+02:00 Andrew Starks <>:

> I think that the Luaverse will be much better off if
> you tackle `coroutine` and `thread`.

OK, the most recent push has them.

Thank you! I read them. Why are coroutines too complicated to explain?

What is the hard definition of a coroutine in Lua?

Is it the execution stack that is contained in a thread that is not the main thread?

Is it any function definition with a call to coroutine.yield?

I think that it's the first one, which doesn't require a call to `coroutine.resume`, which is at least kind of interesting. 

Also, I think that you can leave off the "this topic is to complicated" comment. If it's wanting for further definition, then it should be further defined as part of some later update. If not, then what is there doesn't need and isn't helped by the disclaimer. Imho.