[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: simple and efficient way to have bi-directional communication between lua process
- From: Daniel Quintela <dq@...>
- Date: Fri, 09 Feb 2007 10:25:14 -0300
On mié, 2007-02-07 at 23:25 -0800, gary ng wrote:
> Hi,
>
> Since lua don't have thread support out of the box,
> the alternative would be spawning multiple small lua
> process if I want some form of multi tasking(I know
> there is coroutine but let's say that coroutine
> doesn't fit the scenario).
>
> How would I have a simple efficient way of
> bi-directional communication between two lua process ?
> On, unix platform, using domain socket seems to be
> easiest(though I am not sure if luasocket supports it
> and I was told that there is no such a thing on
> Windows). popen() only creates a one way pipe.
>
> Or must I fallback to the 127.0.0.1 interface ? I see
> two problems with that, security and unnecessary
> payload(the network layer). Though it has the
> advantage that it is network ready by design.
>
> What I want is a relatively portable way(mainly *nix
> and Windows) for this need.
>
> regards,
>
>
>
> ____________________________________________________________________________________
> The fish are biting.
> Get more visitors on your site using Yahoo! Search Marketing.
> http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
You are talking about multiple processes, then you are considering
multiple Lua universes.
LuaTask ( http://luatask.luaforge.net ) is a multithreading addon with
multiple Lua universes and memory queues for inter-universe
communication.
Regards,
DQ