lua-users home
lua-l archive

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



On Jun 21, 2016 3:02 PM, "Coda Highland" <chighland@gmail.com> wrote:
>
> On Tue, Jun 21, 2016 at 12:45 PM, Gregg Reynolds <dev@mobileink.com> wrote:
> >
> > On Jun 21, 2016 10:45 AM, "Roberto Ierusalimschy" <roberto@inf.puc-rio.br>
> > wrote:
> > ...
> >> Right: couroutine is a specific use case of a Lua thread. As it is the
> >> only use of threads inside Lua code, we can say that, looking from Lua,
> >> coroutine = thread.
> >
> > Is it correct to say that a Lua thread is a fiber?  I.e. not an OS or
> > pthread?
> >
> > - gregg
>
> Yes, that could be considered accurate, as fibers are a
> cooperative-multitasking construct.
>

the amazingly cool thing is that we can have cooperative multitasking even with a single sequential thread of execution.  magic.  kinda makes you rethink your concept of execution,  thread, etc.