Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ensure gen_server and clients terminate

  • Loading branch information...
commit 7d9021117fbfbbfdf4194f989b8aa12d06884b8b 1 parent a5ec03a
@aggelgian aggelgian authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 bench/genstress/src/genstress.erl
View
5 bench/genstress/src/genstress.erl
@@ -61,7 +61,7 @@ start_clients(Np, Queue) ->
[spawn_link(fun() -> client(Queue) end) || _ <- lists:seq(1, Np)].
stop_clients(Clients) ->
- [erlang:exit(Client, normal) || Client <- Clients],
+ [erlang:exit(Client, kill) || Client <- Clients],
ok.
client(Queue) ->
@@ -108,6 +108,9 @@ init(_Args) ->
%%
%% -------------------------------------------------------------------- %%
+handle_call(stop, From, S) ->
+ {stop, normal, stopped, S#state{mstate=From}};
+
handle_call(Command, From, S)->
{reply, Command, S#state{mstate=From}}.
Please sign in to comment.
Something went wrong with that request. Please try again.