lua-users home
lua-l archive

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


On Wed, Oct 24, 2007 at 08:00:56PM +0300, Asko Kauppi wrote:
> 
> There was a loooong thread ;) about this on the list lately:
> 
> http://lua-users.org/lists/lua-l/2007-08/msg00267.html

Hm, it seems that there are two issues at stake:

a) Whether to call these things either threads or coroutines.

b) Whether to use both names at the same time for the same thing.

What I was getting at was mainly b), i.e. I am "unhappy" with the
documentation explaining more or less that Lua supports multithreading
in the form of coroutines, that the functions are in the coroutines
package, and yet the objects returned are called threads...

My suggestion is to only use one of the two names in Lua, and since
"coroutines" seems to be the term used more frequently (and the one
that I find more adequate; for me, personally (please no flames) a
thread is something like what pthread_create() does) in the context
of Lua the suggestion is to settle for "coroutine", and drop "thread".

(These issues are of course very much subject to personal taste; I do
not want to start a long discussion on the subject, but wanted to write
a quick note on this subject because the use of both names for one thing
did create some IMHO superfluous confusion when I started reading the
Lua documentation...)

Regards, Colin


> >Hi,
> >
> >while most of Lua is rather consistent with respect to itself (which
> >is good), there is one place where I feel that there is something that
> >would benefit from a changed:
> >
> >The type of the object returned by coroutine.create should be called
> >"coroutine", not "thread".
> >
> >I would find it more consistent to not speak of threads in the context
> >of coroutines; this would also "free" the word "thread" for use in a
> >"real" threading library, etc.
> >
> >Regards, Colin
>