diff options
Diffstat (limited to 'test/notify_and_wait_protocol.erl')
-rw-r--r-- | test/notify_and_wait_protocol.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/notify_and_wait_protocol.erl b/test/notify_and_wait_protocol.erl new file mode 100644 index 0000000..27542f2 --- /dev/null +++ b/test/notify_and_wait_protocol.erl @@ -0,0 +1,11 @@ +-module(notify_and_wait_protocol). +-export([start_link/4]). +-export([init/2]). + +start_link(_, _, _, [{msg, Msg}, {pid, TestPid}]) -> + Pid = spawn_link(?MODULE, init, [Msg, TestPid]), + {ok, Pid}. + +init(Msg, Pid) -> + Pid ! Msg, + receive after 2500 -> ok end. |