2012年3月31日

摘要: RestartStrategy = one_for_one,%%simple_one_for_one不支持子节点为空,会启动出错** exception exit: bad_start_spec,具体原因待查 MaxRestart = 1000, MaxSecondsBetweenRestart = 10, SupFlag = {RestartStrategy, MaxRestart, MaxSecondsBetweenRestart}, io:format("game_service_sup starting......~n"), {ok, {SupFlag, []}}. 阅读全文
posted @ 2012-03-31 13:30 linbingzhong 阅读(176) 评论(0) 推荐(0) 编辑

2012年2月7日

摘要: 代码:View Code 1 -module(lib_misc). 2 -export([pmap/2]). 3 -import(lists, [foreach/2]). 4 5 pmap(F, L) -> 6 S = self(), 7 %%Ref = erlang:make_ref(), 8 lists:foreach(fun(I)-> 9 spawn(fun() ->do_f(S, F, I) end)10 end, L),11 gether(length(L), []).12 ... 阅读全文
posted @ 2012-02-07 11:11 linbingzhong 阅读(275) 评论(0) 推荐(0) 编辑

导航