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. <br>
<br><div class="gmail_quote">On 15 October 2011 12:59, Joel Reymont <span dir="ltr"><<a href="mailto:joelr1@gmail.com">joelr1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Oct 15, 2011, at 12:27 PM, Tim Watson wrote:<br>
<br>
> 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.<br>
<br>
</div>What is preventing you from using a queue to talk to your NIF?<br>
<br>
You can then spawn as many threads as you like in your C code to avoid blocking the emulator.<br>
<br>
--------------------------------------------------------------------------<br>
- for hire: mac osx device driver ninja, kernel extensions and usb drivers<br>
---------------------+------------+---------------------------------------<br>
<a href="http://wagerlabs.com" target="_blank">http://wagerlabs.com</a> | @wagerlabs | <a href="http://www.linkedin.com/in/joelreymont" target="_blank">http://www.linkedin.com/in/joelreymont</a><br>
---------------------+------------+---------------------------------------<br>
<br>
</blockquote></div><br>