Erlang / Erlang Basics Interview questions
What is a PID?
A PID (process identifier) is the opaque reference every Erlang process gets when it's spawned. You
can't inspect or construct one by hand — you receive it from spawn/1 (or a related
function) and use it as the destination for messages.
Pid = spawn(fun loop/0), Pid ! {greet, "hi there"}.
PIDs work the same whether the target process lives on the local node or on a remote one in a distributed Erlang cluster — sending a message to a remote PID looks identical to sending to a local one, which is what gives Erlang its location-transparent messaging.
A PID remains valid only for the life of that process; once the process exits, the PID becomes a dead reference and sending to it is silently a no-op (unless the sender is linked or monitoring it).
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
