[erlang-questions] blocking vs non-blocking gen_tcp:accept()
Fri Feb 15 21:45:02 CET 2008
> Does gen_tcp:accept() block the entire OS thread or just the calling
> erlang process?
Just the erlang process. (verifying this yourself is straightforward)
> "One of the shortcomings of the gen_tcp module is that it only exports
> interface to a blocking accept call." ->
> Does the performance gain of non-blocking accept justify the added
> complexity (finite state machine etc)?
I think the point the author of the trapexit article wanted to make
was that the accept-blocks-the-calling-erlang-process design in
gen_tcp means that you need an extra erlang process in your code.
More information about the erlang-questions