blob: 0a418a58d800f78855490df6318289d44c4a0ec4 (
plain) (
tree)
|
|
-module(b).
-export([start/0, loop/0, wait/0]).
start() ->
spawn(?MODULE, loop, []).
loop() ->
receive
{ping, Ping} ->
a:pong(Ping),
loop();
stop ->
done
end.
%% This checks for a bug in expressions which have no
%% "main" clauses (only after and friends) followed by
%% a return value in the same line.
wait() ->
receive after 1000 -> done end, ok.
|