lua-users home
lua-l archive

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

On 8/10/07, David Given <> wrote:
> Just out of interest, under what situations would one use a Lua thread (usual
> terminology from the manual), *without* having it also be a coroutine?

I'm not sure; but see

Which illustrates the confusion.  A "LuaThread" is not a "lua thread".
 Now suppose the developers decide in the future that it would be a
Good Thing to expose a true thread api as part of the language.
Doesn't seem likely, in light of "we did not (and
still do not) believe in the standard multithreading model, which is
preemptive concurrency with shared memory: we still think that no one
can write correct programs in a language where 'a=a+1' is
notdeterministic."  But who's counting?  "thread" is already taken; I
don't know if one could make it mean "kernel thread" without breakage.

In any case, the point is the current documentation tickles the
Principal of Least Surprise, by assigning a local meaning to a
well-known term.  Not that big of a deal, but we have evidence that
this is a source of confusion.