[erlang-questions] NIF vs. Linked-in Drivers

Björn-Egil Dahlberg egil@REDACTED
Wed Dec 9 16:48:22 CET 2009

Ulf Wiger wrote:
> Max Lapshin wrote:
>> In my linked-in driver fork of sqlite3 driver, NIF function is
>> absolutely unusable, because sqlite3 library will block calling
>> process,
>> thus all functions are executed in async thread.
>> But linked-in driver is harder to implement.
> If you have a limited number of instances of a blocking
> NIF, you could add that number of extra schedulers to
> the system when you start Erlang. Not sure if that would
> have any particular bad side-effects... perhaps the VM
> experts know?

One reason of why it is bad to have more schedulers then processing 
units is because of spinlocks. You can do it but it is far from optimal.


More information about the erlang-questions mailing list