Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commited05acc

Browse files
committed
Fix queue_srv stop race condition.
1 parentfab37c4 commited05acc

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

‎test/queue_srv.erl‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ start_link(Mod) ->
3838
gen_server:start_link({local,?SERVER},?MODULE, [Mod], []).
3939

4040
stop()->
41-
trycall(stop)
42-
catch
43-
exit:{noproc,_} ->ok;
44-
exit:{normal,_} ->ok
45-
end.
41+
gen_server:stop(?SERVER).
4642

4743
call(M)->
4844
gen_server:call(?SERVER,M,infinity).
@@ -107,8 +103,6 @@ init([Mod]) ->
107103
%% {stop, Reason, State}
108104
%% @end
109105
%%--------------------------------------------------------------------
110-
handle_call(stop,_F,S)->
111-
{stop,normal,ok,S};
112106
handle_call({in,Item},_F,#state {q=Q,mod=M }=S)->
113107
NQ=M:in(Item,Q),
114108
{reply,ok,S#state {q=NQ }};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp