diff options
author | Siri Hansen <[email protected]> | 2014-04-30 09:35:06 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-05-26 11:53:25 +0200 |
commit | 9d7d1207ff1240b9711f192deb0893c3a044a3d8 (patch) | |
tree | 037f076b22551563cd4bcd759d71725514ce5f4b /lib/stdlib/src/gen_fsm.erl | |
parent | 9a0635c297503e2ce0ae394c9c44c72fc61a2a31 (diff) | |
download | otp-9d7d1207ff1240b9711f192deb0893c3a044a3d8.tar.gz otp-9d7d1207ff1240b9711f192deb0893c3a044a3d8.tar.bz2 otp-9d7d1207ff1240b9711f192deb0893c3a044a3d8.zip |
Add synchronous stop functions to gen_server and gen_fsm
The functions utilize proc_lib:stop, which in turn utilizes
sys:terminate.
Diffstat (limited to 'lib/stdlib/src/gen_fsm.erl')
-rw-r--r-- | lib/stdlib/src/gen_fsm.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stdlib/src/gen_fsm.erl b/lib/stdlib/src/gen_fsm.erl index 56137cde13..29b1d80088 100644 --- a/lib/stdlib/src/gen_fsm.erl +++ b/lib/stdlib/src/gen_fsm.erl @@ -106,6 +106,7 @@ -export([start/3, start/4, start_link/3, start_link/4, + stop/1, stop/3, send_event/2, sync_send_event/2, sync_send_event/3, send_all_state_event/2, sync_send_all_state_event/2, sync_send_all_state_event/3, @@ -197,6 +198,11 @@ start_link(Mod, Args, Options) -> start_link(Name, Mod, Args, Options) -> gen:start(?MODULE, link, Name, Mod, Args, Options). +stop(Name) -> + gen:stop(Name). + +stop(Name, Reason, Timeout) -> + gen:stop(Name, Reason, Timeout). send_event({global, Name}, Event) -> catch global:send(Name, {'$gen_event', Event}), |