Is `:erlang.process_info(:pid, :message_queue_len)` a heavy operation?

Process.info, when called from an external process, puts a lock on the process being “infoed”. Therefore, it is super safe when calling with self() but not from an external one.

8 Likes