Quantcast

erl_interface is not thread safe

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

erl_interface is not thread safe

Dmitriy Kargapolov-3
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.
_______________________________________________
erlang-bugs mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-bugs
Loading...