<div dir="ltr">It's my understanding that if a normal Erlang process does Pid ! Msg, and Pid has a particularly full message queue, then the sending process is penalised (gives up the remainder of its timeslice, e.g.).<div><br></div><div>Is there any way to implement something similar for enif_send from a NIF?</div><div><br></div><div>I'm calling it from a background thread in my NIF, and it'd be nice if it (e.g.) returned the size of the recipient's message queue, so that I could implement backpressure in my NIF.</div><div><br></div><div>Any ideas?</div><div><br></div></div>