Take the 2-minute tour ×  I have a gen_server module that logs
data to a file when a client process sends it data. What happens
when two client processes send data at the same time to this
module? Will the file operations conflict with each other? The
erlang documentation is frustratingly unclear here.
share|improve this question  4 Answers 4  up vote 8 down vote
accepted  Every Erlang process maintains a message queue. The
process will fetch a message and handle the messages one by one.
In your example, if two clients calls the gen_server at the same
time, these calls will become a message in the queue of
gen_server process, and the gen_server will process these
messages one by one. So no need to worry about a conflict.  But
if one process has to handle too many messages from other
processes, you'll need to think about the capacity of the
process and optimize the design, or else it will become a
bottleneck.  share|improve this answer Thanks! I managed to find
the issue. It turned out that it wasn't a concu