diff options
author | Siri Hansen <[email protected]> | 2014-06-11 14:29:19 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-06-11 14:29:19 +0200 |
commit | da42410cb15c0749ea6cf9b6196b81320d8391b6 (patch) | |
tree | 829f5cdb59cf92cdaf381564fe51885644494650 /lib/stdlib/src/gen_server.erl | |
parent | 5f2b70f205bc64be545b75db5419111aac11291d (diff) | |
parent | 154a057dcbf087deb38b13e97f0a0373e6a72f1d (diff) | |
download | otp-da42410cb15c0749ea6cf9b6196b81320d8391b6.tar.gz otp-da42410cb15c0749ea6cf9b6196b81320d8391b6.tar.bz2 otp-da42410cb15c0749ea6cf9b6196b81320d8391b6.zip |
Merge branch 'siri/sync-stop-gen/OTP-11173'
* siri/sync-stop-gen/OTP-11173:
Add synchronous stop function to wx_object
Fix minor bugs in gen_server and gen_fsm documentation
Update gen_event:stop to be synchronous
Add synchronous stop functions to gen_server and gen_fsm
Add synchronous stop function to proc_lib
Add system message 'terminate'
Remove old code from stdlib/test/sys_sp2.erl
Diffstat (limited to 'lib/stdlib/src/gen_server.erl')
-rw-r--r-- | lib/stdlib/src/gen_server.erl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl index 22acdf10b7..9794c73cc2 100644 --- a/lib/stdlib/src/gen_server.erl +++ b/lib/stdlib/src/gen_server.erl @@ -88,6 +88,7 @@ %% API -export([start/3, start/4, start_link/3, start_link/4, + stop/1, stop/3, call/2, call/3, cast/2, reply/2, abcast/2, abcast/3, @@ -177,6 +178,17 @@ start_link(Name, Mod, Args, Options) -> %% ----------------------------------------------------------------- +%% Stop a generic server and wait for it to terminate. +%% If the server is located at another node, that node will +%% be monitored. +%% ----------------------------------------------------------------- +stop(Name) -> + gen:stop(Name). + +stop(Name, Reason, Timeout) -> + gen:stop(Name, Reason, Timeout). + +%% ----------------------------------------------------------------- %% Make a call to a generic server. %% If the server is located at another node, that node will %% be monitored. |