Inspecting The Process Message Queue
A core tenant of Elixir is message passing between processes. So, if a process is sent a message, where does that message go? What happens if it gets sent many messages? The Process.info/2
function allows us to inspect the message queue.
First, let's send some messages (to ourself) and then keep an eye on the length of the message queue as we go.
Now, I am curious what those specific messages are. Let's ask Process.info/2
for the messages that are in the message queue.
There are a lot of other things that Process.info/2
can tell us about a process. See the Erlang docs for process_info
for more details.
Last updated