摘要:
erlang 进程通讯中 执行到 receive 语句时 如果信箱没有消息可以匹配时会暂停等待消息.go() -> register(echo, spawn(test_pid,loop,[])), echo ! {self(), hello}, receive {_Pid,Msg} -> io:format("~w~n",[Msg]) end. %%Pid ! stop.loop() -> io:format(" loop start~n", []), receive {From, Msg} -> ... 阅读全文
posted @ 2013-07-05 09:09 bobolive 阅读(232) 评论(0) 推荐(0) 编辑