We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ea809e commit 6e6ed6aCopy full SHA for 6e6ed6a
1 file changed
lib/elixir/src/elixir_code_server.erl
@@ -70,7 +70,7 @@ handle_call(retrieve_compiler_module, _From, Config) ->
70
handle_call(purge_compiler_modules, _From, Config) ->
71
{Used, Unused, Counter} = Config#elixir_code_server.mod_pool,
72
purge_used(Used),
73
- Mods = lists:map(fun({Mod, _}) -> Mod end, Used),
+ Mods = [Mod || {Mod, Purgeable} <- Used, Purgeable],
74
ModPool = {[], Mods ++ Unused, Counter},
75
{reply, {ok, length(Used)}, Config#elixir_code_server{mod_pool=ModPool}};
76
@@ -112,7 +112,7 @@ handle_cast(purge_compiler_modules, Config) ->
112
%% purge them asynchronously, especially because they can
113
%% block the code server. Ideally we would purge them in
114
%% batches, but that's not supported at the moment.
115
116
Opts = [{monitor, [{tag, {purged, Mods}}]}],
117
erlang:spawn_opt(fun() -> purge_used(Used) end, Opts)
118
end,
0 commit comments