lua-users home
lua-l archive

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


On Fri, 2005-08-05 at 12:24 +1000, David Burgess wrote:
> It would appear (from reading the doco) that Fibers in Win32, would 
> allow a fairly easy implementation of C coros for Lua. These APIs
> are fairly close to ucontext and could emulate the ucontext suite
> of functions. See 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/fibers.asp
> 
> Fibers are supported for 98/me and NT3.51 forward. Sorry no WIn95.
> 
> So, for recent *nix and Win32 there would seem to be a way to implement.
> 
> The older Unixes represent a bit of a problem.

ucontext_t isn't a requirement on Unix. Checkout libpcl (Portable
Coroutine Library). They use methods developed by the GNU Pth folks,
which abuse sigstack() and/or sigaltstack().

(I'm reading this message without having read the previous posts as I
just joined. Apologies if I missed something.)