[erlang-questions] writing a linked in driver by hand or using a tool.
Tue Aug 10 19:18:33 CEST 2010
On Tue, Aug 10, 2010 at 6:02 PM, Max Lapshin <> wrote:
> > NIF's allow you to create threads. So you can just create a worker
> > thread when the NIF is loaded. When calling a NIF function from
> > Erlang, you just push the request onto a queue for the thread and let
> > the thread handle it and send the response back to the requesting pid.
> This is the question: which is the best way to add queue for thread?
> Don't forget, that thread may block when there is nothing to handle
> and resume, when new task appears.
Since my worker thread is a kqueue event thread, I use a pipe to communicate
More information about the erlang-questions