Is driver_mk_atom() thread safe?
Chris Newcombe
chris.newcombe@REDACTED
Fri Sep 25 19:32:30 CEST 2009
Hi BEAM / OTP team,
I have a driver that uses private thread-pools. I know there are
heavy restrictions on calling most erl_driver functions from private
threads, and for some functions the documentation now helpfully says
whether they are thread-safe, or only thread-safe when using the SMP
emulator etc.
The documentation for driver_mk_atom() doesn't mention thread-safety
(see below).
Please could it be documented one way or the other? (If it's not
thread-safe then that's fine, I'll just have to work around it. But
it would be great to know.)
Many thanks,
Chris
>From the erl_driver man-page:
ErlDrvTermData driver_mk_atom(char* string)
This function returns an atom given a name string. The atom is
created and won't change, so the return value may be saved and reused,
which is faster than looking up the atom several times.
More information about the erlang-questions
mailing list