lua-users home
lua-l archive

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


> More findings:
> 
> The weak-keyed table (key=Timer value=Callback) is handled in traverseephemeron().
> The local variables get assigned this values:  prop=0 hasclears=1 marked=1
> -> Table is moved to g->allweak
> 
> Later the failing Timer is constructed and an entry is added to the table.
> 
> Later atomic() is called and the first call to clearvalues(g->allweak) in atomic()
> clears the added entry.  -> Callback is gone.
> 
> Note that traverseephemeron() is not called again for this table after the Timer
> was constructed.  If this is good or bad, I don't know.
> 
> I have the impression that 'allweak' is for "kv" tables.  Is this right?  But why is
> this table moved from 'ephemeron' to 'allweak'?  Its mode is still "k".
> 
> Any hints on how to proceed?

I have a suspect. I think the table should be moved to 'allweak' only
in the atomic phase. But, as you describe (and apparently according to
the code, too), it is being moved in the middle of the collection, which
seems clearly wrong. But I must have a closer look. (This seems too
stupid to be true :-(

-- Roberto