aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/dummy_h.erl
diff options
context:
space:
mode:
authorIngela Andin <[email protected]>2017-05-15 11:50:26 +0200
committerGitHub <[email protected]>2017-05-15 11:50:26 +0200
commit8baada6ba97f7809c99cae4e799fddb273a54882 (patch)
tree423bf8c323b41dbd774d843b9dc4503cb9aead40 /lib/stdlib/test/dummy_h.erl
parentf1f81f0039466d203f66c4010fb94266bf8a7e9f (diff)
parent90a84ea8bb70bf885a83d0aa4dfa598c7f45dc67 (diff)
downloadotp-8baada6ba97f7809c99cae4e799fddb273a54882.tar.gz
otp-8baada6ba97f7809c99cae4e799fddb273a54882.tar.bz2
otp-8baada6ba97f7809c99cae4e799fddb273a54882.zip
Merge pull request #1407 from eltex-ecss/auto_hibernate_timeout
Add option hibernate_after to gen_server, gen_statem and gen_event. Also added to the deprecated gen_fsm behaviour. OTP14405
Diffstat (limited to 'lib/stdlib/test/dummy_h.erl')
-rw-r--r--lib/stdlib/test/dummy_h.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stdlib/test/dummy_h.erl b/lib/stdlib/test/dummy_h.erl
index 45ccfee240..7a9eb11f98 100644
--- a/lib/stdlib/test/dummy_h.erl
+++ b/lib/stdlib/test/dummy_h.erl
@@ -43,6 +43,9 @@ handle_event(hibernate, _State) ->
{ok,[],hibernate};
handle_event(wakeup, _State) ->
{ok,[]};
+handle_event({From, handle_event}, _State) ->
+ From ! handled_event,
+ {ok,[]};
handle_event(Event, Parent) ->
Parent ! {dummy_h, Event},
{ok, Parent}.
@@ -75,6 +78,9 @@ handle_info(wake, _State) ->
{ok, []};
handle_info(gnurf, _State) ->
{ok, []};
+handle_info({From, handle_info}, _State) ->
+ From ! handled_info,
+ {ok, []};
handle_info(Info, Parent) ->
Parent ! {dummy_h, Info},
{ok, Parent}.