lua-users home
lua-l archive

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


> ------------------------------
> Date: Tue, 28 Dec 2010 16:27:44 -0200
> From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
> Subject: restarting the GC
> To: Lua list <lua-l@lists.lua.org>
> Message-ID: <20101228182744.GA9791@inf.puc-rio.br>
> Content-Type: text/plain; charset=us-ascii
> 
> Currently, if you stop the garbage collector (collectgarbage'stop')
> and later force a full collection (collectgarbage()), the collector
> restarts running. How many of you rely on this behavior? Wouldn't
> it be more useful to keep the collector stopped until an explicit
> call to collectgarbage'restart'?
> 
> -- Roberto

I prefer the explicit 'restart'. It makes the interface more orthogonal
and follows the "principle of least surprise" (at least it would be less
surprising to me).

John Giors
Independent Programmer
Three Eyes Software
jgiors@ThreeEyesSoftware.com
http://ThreeEyesSoftware.com