0
如何在訪問Erlang中的shell時獲取當前正在運行的進程的進程ID。如何在Erlang shell中獲取當前進程的進程ID?
如何在訪問Erlang中的shell時獲取當前正在運行的進程的進程ID。如何在Erlang shell中獲取當前進程的進程ID?
過程 - 併發 的基本單位 - 便宜產卵 - 有自己的堆棧&堆 - 不與其他進程共享 存儲器 - 的通信通過異步消息傳遞來完成。 - 實施例:
二郎殼訪問
> 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