[erlang-questions] gproc:monitor(Key, follow)

Ulf Wiger ulf@REDACTED
Thu May 29 10:33:51 CEST 2014


In this sense, gproc:monitor/2 works like erlang:monitor/2, which also
stays silent if the object is alive and well.

Perhaps the easiest thing to do is to simply look up the name right after
calling monitor()?

BR,
Ulf W


2014-05-28 18:04 GMT+02:00 Camille Troillard <lists@REDACTED>:

> OK, so it seems gproc:monitor(Key, follow) works, however if the name is
> already registered the message {gproc, registered, Ref, Key} is not sent. I
> would have expected the message to be sent since {gproc, unreg, Ref, Key}
> is sent when the name is not registered. Is this a bug?
>
>
> On 28 May 2014, at 17:15, Camille Troillard <lists@REDACTED> wrote:
>
> > Hello,
> >
> > I would like to take action when a name gets registered under gproc.
> >
> > I understood I could call gproc:monitor(Key, follow) during
> initialization but my process does not get notified of the name
> availability. Therefore I had to replace that call to gproc:nb_wait, and
> then monitor the process in the callback handler. I wish I could follow the
> former approach.
> >
> > Can someone explain the usage pattern of gproc:monitor(_, follow)?
> > I am trying to understand why this would not work.
> > Thanks!
> >
> > Camille
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140529/22a792d6/attachment.htm>


More information about the erlang-questions mailing list