lua-users home
lua-l archive

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



Le 27 juin 2016 à 10:52, Viacheslav Usov <via.usov@gmail.com> a écrit :

> Although interesting, his is unrelated with the original subject of this discussion, that was about discussing possible ways of improving the current GC algorithm in Lua, by releasing values sooner when some locality conditions are satisfied (and not about releasing costly resources in a deterministic way).

"Releasing resources sooner when some locality conditions are satisfied" is not necessary, but sufficient for "releasing costly resources in a deterministic way »

Yes and no. Reducing the cost of the GC would benefit to many applications where responsiveness is important like games or UI-intensive applications, and this seems to be the main goal of ‘transaction oriented GC’. Determinism in the release of local resources can come as a consequence in specific cases, but the risk if you rely on this for releasing resources, is to make your resource management code fragile regarding small internal adjustments in the conditions for declaring a value as ‘published’. This is why I think we should not consider both as the same subject.

(Also, my point was about not diverging this post on how to use pcall, or on how to change the language syntax for guarantying deterministic resource release.)

Jean-Luc