[erlang-questions] blocking vs non-blocking gen_tcp:accept()

Tony Rogvall <>
Fri Feb 15 23:00:55 CET 2008


The only way (tm) to block the OS thread is to write your own loadable  
driver
and sleep for a while.

/Tony

On 15 feb 2008, at 21.16, Robin wrote:

> Does gen_tcp:accept() block the entire OS thread or just the calling
> erlang process?
>
> "One of the shortcomings of the gen_tcp module is that it only exports
> interface to a blocking accept call." ->
> http://www.trapexit.org/Building_a_Non-blocking_TCP_server_using_OTP_principles
>
> Does the performance gain of non-blocking accept justify the added
> complexity (finite state machine etc)?
>
> thanks,
>
> Robin
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list