From ec98f78f154bcf71afbf198386dc0ffb765839f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 17 Oct 2019 15:05:57 +0200 Subject: Use a map instead of pdict to keep pid active/removed state The performance seems to be equal as far as Cowboy is concerned, with a possible tiny improvement in the favor of maps. The code is smaller and the runtime introspection far cleaner because the process dictionary is small again. --- test/acceptor_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/acceptor_SUITE.erl b/test/acceptor_SUITE.erl index 7fc26f4..217ba56 100644 --- a/test/acceptor_SUITE.erl +++ b/test/acceptor_SUITE.erl @@ -319,7 +319,7 @@ misc_set_transport_options(_) -> num_acceptors => 2, shutdown => 1001, socket_opts => [{send_timeout, 5002}]}), ConnsSups = [ConnsSup || {_, ConnsSup} <- ranch_server:get_connections_sups(Name)], _ = [begin - {State, _, _, _} = sys:get_state(ConnsSup), + {State, _, _, _, _} = sys:get_state(ConnsSup), 20 = element(10, State), 5001 = element(9, State), 1001 = element(5, State) -- cgit v1.2.3