On Thu, Jan 09, 2020 at 10:56:59AM +0100, Thierry Fournier wrote:
> >> Maybe we try to include new option "tune.lua.forced-gc".
> > 
> > Based on your description if we need an option, I'd rather have the
> > opposite, like "tune.lua.disable-gc" so that it remains enabled by
> > default, and with an explanation that one must not disable it.
> 
> 
> I agree, but it make sense to run some tests:
> 
>  - First, testing your patch to decide if the GC line 1195 is relevant
>  - Second, testing the behavior when GC is disabled and lua create connexion 
> and lua fail without closing connexion.
> 
> Maybe the second case make the GC mandatory.

Probably but then it should only be needed in hlua_ctx_destroy(), no ?
My understanding is that the only goal is to be sure to kill such an
orphan connection in case the Lua application dies, so I tend to think
it's never needed in resume (I don't see how we'd resume after dying)
and that hlua_ctx_destroy() should always be called for the cleanup so
it should possibly be enough. 

Willy

Reply via email to