[erlang-bugs] erl_interface is not thread safe
Dmitriy Kargapolov
dmitriy.kargapolov@REDACTED
Thu Oct 16 18:19:12 CEST 2008
Hi,
I've found erl_interface / ei library to be not thread safe.
This has been directly noticed in erl_format(), erl_match() behaviour,
also I did manage to make my port program stable only when all
erl_interface/ei calls from multiple threads were protected by mutex
locks...
For some reason this fact is not documented.
Should be clearly mentioned in the documentation until fixed.
My OTP version R11B-5, but same problem I'm sure still exists in R12B-*
erl_interface compiled for thread support:
lib/erl_interface-3.5.5.3/src/eidefs.mk:
...
# Have the ei and erl_interface libs been compiled for threads?
EI_THREADS=true
# Threads flags
THR_DEFS=-D_REENTRANT -D_THREAD_SAFE -DPOSIX_THREADS -isystem
/usr/include/nptl
# Threads libs
THR_LIBS=-lpthread
...
Thanks.
More information about the erlang-bugs
mailing list