[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaSocket data duplication woes
- From: Diego Nehab <diego@...>
- Date: Wed, 29 Oct 2003 00:11:05 -0500 (EST)
Hi,
> This makes me wonder if LuaSocket doesn't play well when signals are
> thrown into the mix. Has anybody else had similar issues with
> LuaSocket? I'm told there's a whole world of pain when you start
> mixing
> signals and select() - are there any plans to let LuaSocket use poll()
> in any newer versions? (Even if they're only for Lua 5)
>From the top of my head, I don't remember reading anything against
>using
select with signals. If you could give me more hints about what could
happen, I would be happy to discuss possible solutions with you.
If I could offer one solution to the users and make everyone happy, I
would do it. Unfortunately, the poll function call is not available
several systems.
LuaSocket uses non-blocking I/O and makes heavy use of the select
function to avoid busy waiting. Even if I offered support for the poll
function, that wouldn't get rid of your problem unless I changed the
internal usage of select in LuaSocket too.
Maybe there is another fast way of checking the time. How about passing
this responsibility to the clients? I know it is not as safe as having
the server handle it, but it might work well enough.
Regards,
Diego.