PID is an abbreviation for process identifier. Each process has a PID which identifies the process. PIDs are unique among processes that are alive on connected nodes. However, a PID of a terminated process may be reused as a PID for a new process after a while. The BIF self/0 returns the PID of. {pid, Pid} Pid is the process identifier of the process that originally created the fun. It might point to the init process if the Fun was statically allocated when module was loaded (this optimisation is performed for local functions that do not capture the environment). {index, Index}. · Erlang Reference Manual User's Guide Version Novem. Copyright © Ericsson AB. All Rights Reserved.
If "schedule" is known to global, an Erlang pid is returned that can be used to send messages to the schedule service. Additionally, node will be initialized to contain the name of the node where the service is registered, so that you can make a connection to it by simply passing the variable to erl_connect(). Erlang is designed for massive concurrency. Erlang processes are lightweight (grow and shrink dynamically) with small memory footprint, fast to create and terminate, and the scheduling overhead is low. Erlang Reference Manual User's Guide Version Novem. Copyright © Ericsson AB. All Rights Reserved.
It can be any Erlang term. An atom is generally good enough, for example api It contains the pid of the top-level supervisor for the listener. 26 thg 8, every node (virtual machine) in the system, and any Erlang nodes that the same name, its pid changes but other processes can continue to. 13 thg 5, Elixir and Erlang allow us to name processes. By giving process name, we associate PID with certain atom. Let's have a look at our worker.
0コメント