[erlang-questions] enif_send backpressure

Roger Lipscombe roger@REDACTED
Thu May 25 22:09:51 CEST 2017


On 25 May 2017 at 20:53, Felix Gallo <felixgallo@REDACTED> wrote:

> If your NIF is running in a process managed by the scheduler,
>

It's not. It's running on a background thread that's unrelated to Erlang.
We call enif_send from that background thread.

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.


> 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.
>

Given that erts_queue_message *already* returns the message queue length of
the recipient, it's not exactly "reaching into the internals".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170525/acab586b/attachment.htm>


More information about the erlang-questions mailing list