[erlang-questions] How to get scheduler_id in nif?

Sergej Jurečko sergej.jurecko@REDACTED
Mon Nov 7 11:40:20 CET 2016


On Nov 7, 2016 3:53 PM, "Jesper Louis Andersen" <
jesper.louis.andersen@REDACTED> wrote:
>
>
>
> On Sat, Nov 5, 2016 at 9:09 AM Sergej Jurečko <sergej.jurecko@REDACTED>
wrote:
>>
>> My suggestion is to call it from erlang when starting up your nif and
save it to a thread local storage variable.
>>
>>
> That sounds like a data race waiting to happen. If your process is moved
from one scheduler to another or if the scheduler you are running on are
taken offline by the operating system, you are in trouble.
>

Assuming he needs this data for communication with erlang code not
something that is inside a nif only.

Sergej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161107/add8b421/attachment.htm>


More information about the erlang-questions mailing list