lua-users home
lua-l archive

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


Hi,

David Burgess wrote:
> First, a question: do you ever sleep?

Don't worry. :-) (e.g. I'm on a weekend trip Thu-Sun.)

> I hope that this makes it to the official beta or next work version of 5.1,
> the changes are very small.

Ok, maybe the 'userstate' diff. The rest is unlikely to
go into the standard Lua core, because it's not portable.
But Coco is a lot easier to maintain 'outside' of the
core than RVM.

> My understanding is that Win32 fibers each get a C stack regardless and
> that this C stack will expand as required. Is my understanding wong?

This is what I've read over at MSDN, too. But I haven't tried.

In my experiments the stack size setting seemed to be more
or less ignored (on both Win98 and wine). But CreateFiberEx()
is XP or W2KP-SP4 only.

> For Win32, Do you know what happens when Lua is executing in an
> OS thread, the thread gets converted to a fiber(in Lua) and then eventually
> the calling application ends the thread. Does the caller need check if the
> thread it initiated is now a fiber and call DeleteFiber rather than 
> ExitThread() or _endthread()? Should I check this out?

I haven't tried. Note that ConvertFiberToThread() only works
on XP. Which is a good indication that this is optional.

My guess is that the current fiber gets deleted together with
the thread because it's stored in the TIB. I wouldn't loose
sleep over that. :-)

Bye,
     Mike