[erlang-questions] NIFs and hooking file descriptors to Erlang-manged poll

Serge Aleynikov serge@REDACTED
Thu Jan 29 15:20:25 CET 2015


Is there a way to hook a file descriptor from within a NIF function to the
select/epoll/poll loop managed by the emulator with a callback invoked in
the "NIF-land" on activity detected on the file descriptor?

I am looking for similar functionality available to NIF functions that is
available when writing drivers using driver_select() call (*).  More
specifically, I have an eventfd file descriptor that I'd like to be
notified about without allocating a separate OS thread to poll on that FD
and return results by sending a message to a given Erlang Pid.

Thanks,

Serge

(*) http://www.erlang.org/doc/man/erl_driver.html#driver_select
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150129/185469db/attachment.htm>


More information about the erlang-questions mailing list