Comparison

util/gc.lua @ 10935:2d57c49bfa12

util.gc: Linter fixes [luacheck]
author Matthew Wild <mwild1@gmail.com>
date Mon, 15 Jun 2020 14:23:47 +0100
parent 10933:f59bc81245b3
child 11431:4874b54af344
comparison
equal deleted inserted replaced
10934:b4daa697a7ea 10935:2d57c49bfa12
1 local array = require "util.array";
2 local set = require "util.set"; 1 local set = require "util.set";
3 2
4 local known_options = { 3 local known_options = {
5 incremental = set.new { "mode", "threshold", "speed", "step_size" }; 4 incremental = set.new { "mode", "threshold", "speed", "step_size" };
6 generational = set.new { "mode", "minor_threshold", "major_threshold" }; 5 generational = set.new { "mode", "minor_threshold", "major_threshold" };
39 elseif mode == "generational" then 38 elseif mode == "generational" then
40 collectgarbage(mode, 39 collectgarbage(mode,
41 user.minor_threshold or defaults.minor_threshold, 40 user.minor_threshold or defaults.minor_threshold,
42 user.major_threshold or defaults.major_threshold 41 user.major_threshold or defaults.major_threshold
43 ); 42 );
44 end 43 end
45 return true; 44 return true;
46 end 45 end
47 46
48 return { 47 return {
49 configure = configure; 48 configure = configure;