[erlang-questions] Process heap inspector
Mon Nov 28 16:52:29 CET 2011
On 11/28/2011 04:23 PM, Paul Davis wrote:
> On Mon, Nov 28, 2011 at 7:55 AM, Kostis Sagonas<> wro
>> I can see that this may be handy to have at some situations, but provided I
>> understand what is happening at the implementation level (disclaimer: I have
>> not looked at the implementation), I think it's actually a pretty bad idea
>> to include in a non debug-enabled runtime system.
>> The reason is that this breaks all assumptions/invariants of the runtime
>> system in that Erlang processes are independent and can be scheduled to
>> execute concurrently on an SMP without being preempted by anything other
>> than exhausting their reduction step count or being stuck on some receive.
>> With this "built-in feature" processes need to be able to stop at more or
>> less any random point and stay suspended for an indefinite amount of time
>> based on code that _another_ process is executing.
> Bit confused, but wouldn't this objection also apply to
> erlang:suspend_process/2  as well?
Right. It would. But I do not remember anybody asking the list before
this introduced so that I have the chance to voice my opinion.
> I use this quite often in
> production on long lived processes that are chewing up resources. Its
> quite the handy tool in certain cases.
I very much agree. In fact, I also wrote that it's quite handy to have
these built-ins as a debugging aid but one should really understand that
they better not be used outside debugging sessions (note also the
warning in the documentation ). Personally, I would be reluctant to
use them in a production system, but then again, perhaps I do not have
much experience in "real-life" production systems...
>  http://erlang.org/doc/man/erlang.html#suspend_process-2
More information about the erlang-questions