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

Sverker Eriksson sverker.eriksson@REDACTED
Tue Nov 8 15:53:26 CET 2016


On 11/08/2016 03:11 AM, Zhongzheng Liu wrote:
> I am trying to make my nif lock free like erlang:make_ref/0 and
> erlang:unique_integer/0 in OTP 18+
>
>
>

Why not use the enif_tsd_* interface (thread specific data)
and create your own unique id for each calling thread.


/Sverker, Erlang/OTP






More information about the erlang-questions mailing list