<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 25 May 2017 at 20:53, Felix Gallo <span dir="ltr"><<a href="mailto:felixgallo@gmail.com" target="_blank">felixgallo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If your NIF is running in a process managed by the scheduler, </div></blockquote><div><br></div><div>It's not. It's running on a background thread that's unrelated to Erlang. We call enif_send from that background thread.</div><div><br></div><div>At some point we'll look at moving the whole thing to use dirty schedulers, but that's a couple of months of work vs. what looks like about a 10 line patch.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>That way you wouldn't have to reach into the internals of another process to make your own determination, which seems like it'd be a better idea.</div></div></blockquote><div><br></div><div>Given that erts_queue_message *already* returns the message queue length of the recipient, it's not exactly "reaching into the internals".<br></div></div></div></div>