[erlang-questions] how to make binary in native thread created by enif_thread_create?
Jovi Zhang
bookjovi@REDACTED
Wed Sep 28 10:01:32 CEST 2011
Thanks, it works correctly.
On Wed, Sep 28, 2011 at 3:28 PM, Paul Davis <paul.joseph.davis@REDACTED> wrote:
> Jovi,
>
> You can create environments with enif_alloc_env that are not bound to
> the scope of a NIF callback. See:
>
> http://www.erlang.org/doc/man/erl_nif.html#enif_alloc_env
>
> On Wed, Sep 28, 2011 at 2:10 AM, Jovi Zhang <bookjovi@REDACTED> wrote:
>> Hi,
>> This is a question about erlang NIF thread.
>>
>> As title, I cannot invoke enif_make_binary in native thread
>> created by enif_thread_create.
>>
>> enif_make_binary need a env parameter, but it native thread, there
>> don't have this env, of course I cannot use process bond environment,
>> because those environment is invalid after
>> NIF call finished.
>>
>> .jovi
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
More information about the erlang-questions
mailing list