lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Tuesday, September 5, 2006, 3:04:10 AM, D Burgess wrote:

>> But, yikes, this is getting
>> to be an awful lot of overhead just to get a pointer to a thread
>> context.

> I have no simple solution.

Thanks for helping me kick this around.

I will try this...

1. Create a table in the registry owned by the loadable library

2. Enter contexts in this table keyed the the thread address (L)

3. Cache the most recently used context in the library to avoid the
hit of two table lookups for very operation. Caching is safe per:
http://thread.gmane.org/gmane.comp.lang.lua.general/21690/focus=21706

Regards,

e

-- 
Doug Currie
Londonderry, NH