lua-users home
lua-l archive

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


> 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 :-(

I think my hypothesis is wrong. All tables are retraversed at the
atomic phase, no matter what lists they are (see 'retraversegrays').

You said:

> The weak-keyed table (key=Timer value=Callback) is handled in
+traverseephemeron().
> [...]
> Later atomic() is called and the first call to clearvalues(g->allweak) in
+atomic()
> clears the added entry.  -> Callback is gone.

Can you check whether the table is handled again by 'traverseephemeron'
when 'atomic' is called? It should be (through the call to
'retraversegrays'), and this late 'traverseephemeron' should mark the
callback...

-- Roberto