[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: coroutines and yield / preempting in linehook
- From: Brian Swetland <swetland@...>
- Date: Wed, 25 Dec 2002 13:51:04 -0800
[Luiz Henrique de Figueiredo <email@example.com>]
> >In case anyone cares, my goal here is a little server framework where
> >each connected client can be handled by a separate lua thread.
> If you use independent Lua states for each connection, you can use Lua off
> the self; you don't need to compile the core to use locking, unless you want
> client connections to communicate with each other.
Good point. There's very little state I want to share (and for the most
part I want to prevent one client from interacting with another), and
I could just provide a few functions from c to access shared state safely.
It still would be neat if I could use the yield stuff instead of threads,
but it doesn't look like that's possible.