[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1 upvalues
- From: "Robert G. Jakabosky" <bobby@...>
- Date: Sat, 9 Apr 2011 23:10:00 -0700
On Saturday 09, Anthony Howe wrote:
> On 09/04/2011 00:59, Robert G. Jakabosky whispered from the shadows...:
> > lua_newtable(L);
> > lua_pushvalue(L, -1);
> > lua_pushcclosure(L, &foobar, 1);
> > lua_pushvalue(L, -2);
> > lua_pushcclosure(L, &barblat, 1);
> > lua_remove(L, -3);
>
> I just realised that there is a C function upvalue limit of 256, which
> is isn't sufficient for a network application to scale to 1000's of
> connections in theory.
That is a per closure limit, not a global limit. Unless you need more then
256 upvalues for one closure? in that case just use one table as the upvalue
are store as many values as you want in it.
--
Robert G. Jakabosky