##Concurrency

  1. start new process, spawn/1

    G = fun(X) -> timer:sleep(X), io:format(“~p~n”, [X]) end. [spawn(fun(X) -> G(X) end) || X <= list:seq(1,10)].

  2. send message

    self() ! self() ! double

  3. receive message

    receive Pattern1 when Guard1 -> Expr1; Partern2 when Guard2 -> Expr2; _ -> Expr3 end.


乌托邦

xl

Stay hungry, Stay foolish.