<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Nov 5, 2016 at 9:09 AM Sergej Jurečko <<a href="mailto:sergej.jurecko@gmail.com">sergej.jurecko@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr" class="gmail_msg">My suggestion is to call it from erlang when starting up your nif and save it to a thread local storage variable.</p>
<p dir="ltr" class="gmail_msg"><br></p></blockquote><div>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.</div><div><br></div><div>I'm more inclined to ask why it is useful to know which scheduler_id a given process is being run on. </div></div></div>