[erlang-questions] What is the proper way of sending messages to pid from enif thread?
Max Lapshin
max.lapshin@REDACTED
Tue Jul 7 18:30:28 CEST 2015
Hi.
I've created thread in nif function. When I create thread, I know pid of
caller:
ErlNifPid self;
enif_self(env, &self);
But later in thread I need to create some environment and send message to
this pid.
What is the proper way to save this ErlNifPid in C structure so that code
in other thread will be able to send messages.
And as far as I understand, I need to call enif_alloc_env in that thread?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150707/22465f54/attachment.htm>
More information about the erlang-questions
mailing list