[erlang-questions] How to get scheduler_id in nif?
Jesper Louis Andersen
Mon Nov 7 11:23:12 CET 2016
On Sat, Nov 5, 2016 at 9:09 AM Sergej Jurečko <sergej.jurecko@REDACTED>
> 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.
I'm more inclined to ask why it is useful to know which scheduler_id a
given process is being run on.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions