[erlang-questions] New NIF behavior in R15???

Tim Watson watson.timothy@REDACTED
Sat Oct 15 14:10:26 CEST 2011


Sure I get that it's possible but as I said, I've not used NIFs yet and from
reading the documentation you'd expect that the *expected* thing to do with
a NIFs is keep it bound to the calling process and use it for fast
synchronous calls, whereas linked-in drivers provide an explicit API for
executing tasks asynchronously.

On 15 October 2011 12:59, Joel Reymont <joelr1@REDACTED> wrote:

>
> On Oct 15, 2011, at 12:27 PM, Tim Watson wrote:
>
> > I was under the impression that linked-in drivers are the way to go if
> you want to avoid blocking the emulator whilst potentially long running
> tasks execute.
>
> What is preventing you from using a queue to talk to your NIF?
>
> You can then spawn as many threads as you like in your C code to avoid
> blocking the emulator.
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111015/388e1726/attachment.htm>


More information about the erlang-questions mailing list