[erlang-questions] process_info message_queue_len

Heinrich Venter heinrich@REDACTED
Fri Jun 1 15:32:57 CEST 2007


Hi All

 

I want to know which of the processes in my system is taking long to handle
messages.  I tried to use erlang:process_info(PID) to get the
message_queue_len.  The problem is that it always returns 0.

 

As an example, I built the following function to test it.

 

F=fun() -> receive xx -> io:format("done~n") end end.

P=spawn(F).

P!abc

erlang:process_info(P).

 

This gives me a message_queue_len of 0.  Am I missing something?  Maybe
message_queue_len measures something other than the number of messages in
the mailbox for a process?

 

Any help would be appreciated.

 

Thanks

 

-]-[

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070601/be4114ce/attachment.htm>


More information about the erlang-questions mailing list