English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Se llama whereis (Nombre). Devuelve el pid del proceso registrado con ese nombre.
whereis(átomo, pid)
átomo −Este es el nombre de registro que se le asigna al proceso.
Enlazado al ID de proceso del átomo.
-module(helloworld). -export([start/0, call/2]). call(Arg1, Arg2]) -> io:fwrite("~p~n",[Arg1]). start() -> Pid = spawn(?MODULE, call, ["hello", "process"]), register(myprocess, Pid), io:fwrite("~p~n",[whereis(myprocess)]).
Cuando ejecutamos el programa superior, obtendremos el siguiente resultado.
<0.55.0> "hola"