[erlang-questions] Letting 'every process run until it is blocked' on an Erlang node.

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Mon Feb 25 13:22:21 CET 2013

On Feb 25, 2013, at 11:31 AM, Stavros Aronis <aronisstav@REDACTED> wrote:

> (Also on Stack Overflow:
> http://stackoverflow.com/questions/15064887/letting-every-process-run-until-it-is-blocked-on-an-erlang-node
> )
> Is it possible to write a function that waits for every process
> running on an Erlang node to reach a point where it is blocked,
> waiting for a message?

I have some code which does so for a set of processes by calling process info for each process as you do. But, I retry until the processes reach a fixpoint in reduction count and status. This is not entirely safe either, but it is better than just looking at the state. And it works for some of my Erlang QuickCheck test cases when considering if they are stable.

Jesper Louis Andersen
  Erlang Solutions Ltd., Copenhagen

More information about the erlang-questions mailing list