|
@@ -1,5 +1,5 @@
|
|
%% ==========================================================================================================
|
|
%% ==========================================================================================================
|
|
-%% Syn - A global process registry.
|
|
|
|
|
|
+%% Syn - A global Process Registry and Process Group manager.
|
|
%%
|
|
%%
|
|
%% The MIT License (MIT)
|
|
%% The MIT License (MIT)
|
|
%%
|
|
%%
|
|
@@ -178,14 +178,14 @@ handle_info({'EXIT', Pid, Reason}, State) ->
|
|
end;
|
|
end;
|
|
|
|
|
|
Process ->
|
|
Process ->
|
|
- %% get pg
|
|
|
|
|
|
+ %% get group
|
|
Name = Process#syn_groups_table.name,
|
|
Name = Process#syn_groups_table.name,
|
|
%% log
|
|
%% log
|
|
case Reason of
|
|
case Reason of
|
|
normal -> ok;
|
|
normal -> ok;
|
|
killed -> ok;
|
|
killed -> ok;
|
|
_ ->
|
|
_ ->
|
|
- error_logger:error_msg("Process of PG ~p and pid ~p exited with reason: ~p", [Name, Pid, Reason])
|
|
|
|
|
|
+ error_logger:error_msg("Process of group ~p and pid ~p exited with reason: ~p", [Name, Pid, Reason])
|
|
end,
|
|
end,
|
|
%% delete from table
|
|
%% delete from table
|
|
remove_process(Process)
|
|
remove_process(Process)
|
|
@@ -203,7 +203,7 @@ handle_info(Info, State) ->
|
|
%% ----------------------------------------------------------------------------------------------------------
|
|
%% ----------------------------------------------------------------------------------------------------------
|
|
-spec terminate(Reason :: any(), #state{}) -> terminated.
|
|
-spec terminate(Reason :: any(), #state{}) -> terminated.
|
|
terminate(Reason, _State) ->
|
|
terminate(Reason, _State) ->
|
|
- error_logger:info_msg("Terminating syn pg with reason: ~p", [Reason]),
|
|
|
|
|
|
+ error_logger:info_msg("Terminating syn_groups with reason: ~p", [Reason]),
|
|
terminated.
|
|
terminated.
|
|
|
|
|
|
%% ----------------------------------------------------------------------------------------------------------
|
|
%% ----------------------------------------------------------------------------------------------------------
|