小智 8
进程 - 并发的基本单位 - 产生成本低 - 拥有自己的堆栈和堆 - 不与其他进程共享内存 - 通过异步消息传递完成通信. - 示例:
Erlang shell访问
> self().
<0.720.0> -- Process id
> self() ! {hello, world}, ok.
ok
> self() ! {hello, world}, ok.
ok
> flush(). // Prints what you had done in the session
Shell got {hello, world}
Shell got {hello, world}
ok
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2861 次 |
| 最近记录: |