Erlang ports and thread safety -
i'm looking call c function erlang process via erlang port, described here:
http://www.erlang.org/doc/tutorial/c_port.html
in production need multiple erlang processes calling c function in parallel, each different set of arguments.
my question is, thread safe @ c function level ?
the docs talk controlling erlang process creating 'connected process', sounds if responsible creating isolated instance of 'external program' (c function).
so sounds it's thread safe @ c level i'd 100% sure.
tia
it may depend on implementation, ports, answer "yes" reason mention. if using nif , using shared memory inside of nif, have concern thread safety.
with ports, however, "controlling process" acts serialization (as in arranged in series) layer, meaning requests handled 1 after other , not @ once. moreover, believe (but not know certain) communication protocol ports use requires serial execution.
Comments
Post a Comment