<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <div class="moz-cite-prefix">On 2/17/21 2:03 AM, Lukas Larsson
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAP3zBqM1mkSXxOb=COLq6zNwH=KE3Y_Bu_x7Kwx5gPiHvp4A6g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, Feb 17, 2021 at
            10:34 AM Viktor Söderqvist <<a
              href="mailto:viktor@zuiderkwast.se" moz-do-not-send="true">viktor@zuiderkwast.se</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">Hello!<br>
            <br>
            On 2021-02-17 08:07, Lukas Larsson wrote:<br>
            > You are in luck!<br>
            > <br>
            > PR-2735[1] aka EEP-53[2] adds erlang:monitor/3[3] which
            can be used to <br>
            > do what you want. It will be released in Erlang/OTP 24.<br>
            > <br>
            > [1]: <a href="https://github.com/erlang/otp/pull/2735"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/erlang/otp/pull/2735</a>
            <br>
            > [2]: <a
              href="https://github.com/erlang/eep/blob/master/eeps/eep-0053.md"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/erlang/eep/blob/master/eeps/eep-0053.md</a>
            <br>
            > [3]: <br>
            > <a
href="https://erlang.org/~rickard/OTP-16718/erts-11.1.1/doc/html/erlang.html#monitor-3"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://erlang.org/~rickard/OTP-16718/erts-11.1.1/doc/html/erlang.html#monitor-3</a>
            <br>
            <br>
            Nice! But Michael's use case would require an extra monitor
            option.<br>
            <br>
            On 2/16/21 1:14 PM, Michael Truog wrote:<br>
             > If it was possible to provide the data as a string,
            like<br>
             > "erlang:monotonic_time()" to get evaluated when the
            DOWN message<br>
             > is created, that would make me happy though it may
            seem like an<br>
             > odd approach that adds extra latency (it could be a
            separate option).<br>
            <br>
            For example {tag_fun, fun() -> {'DOWN',
            erlang:monotonic_time()} end} or <br>
            so, to create the tag at the time of demotinor time. I
            suppose there <br>
            will still be a short time between the death of the process
            and the <br>
            creation of the tag though.<br>
          </blockquote>
          <div><br>
          </div>
          <div>I don't think we want to enable executing code in the
            context of an already dead or dying process. What happens if
            the code does a gen_server:call? What happens if it does
            gen_server:enter_loop? Could a process be resurrected?</div>
          <div><br>
          </div>
          <div>There are also a lot of assumptions within the VM that a
            dead process does not execute code, so it would a lot of
            work to do.</div>
        </div>
      </div>
    </blockquote>
    Is there interest in adding the native monotonic time to the monitor
    DOWN message due to a separate option?  It should be beneficial to
    have a more accurate time-of-process-death value than is currently
    possible when the DOWN message is received.<br>
    <br>
    Best Regards,<br>
    Michael<br>
    <br>
  </body>
</html>