[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Newbie questions regarding luasocket, tables
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 8 May 2007 12:31:27 -0500
On Tuesday 08 May 2007, Sam Roberts wrote:
> Funny, I needed it yesterday. A benchmark script requests a number of
> objects, and measures time until all objects have been received.
> Outstanding requests are indexed by an identifier in a table, when the
> table size (size:=number of pairs) is zero, all have been received, and
> benchmark result is calculated.
if you only want to test if a table is empty, just do:
function isempty(t)
return next(t) == nil
end
--
Javier
Attachment:
pgpnecJCroz7s.pgp
Description: PGP signature