[erlang-questions] Calling (equivalent of) erlang:send_after/3 from a NIF?

Lukas Larsson garazdawi@REDACTED
Tue Oct 30 16:19:11 CET 2018

On Tue, Oct 30, 2018 at 4:04 PM Roger Lipscombe <roger@REDACTED>

> On 30 October 2018 at 14:03, Nathaniel Waisbrot <nathaniel@REDACTED>
> wrote:
> > Maybe you could use a port driver for this.
> > http://erlang.org/doc/man/erl_driver.html
> The port driver API does appear to be slightly "richer" in the
> specific timer/select area, but the API looks kinda complicated, and
> we've already got a NIF, so...

>From the documentation: http://erlang.org/doc/man/erl_driver.html

"Most functions in this API are *not* thread-safe, that is, they *cannot* be
called from arbitrary threads. Functions that are not documented as
thread-safe can only be called from driver callbacks or function calls
descending from a driver callback call."

So, you cannot use the driver timer functions in arbitrary threads either.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20181030/132dbd01/attachment.htm>

More information about the erlang-questions mailing list