[erlang-questions] acceptor loops and hot code swapping

Roberto Ostinelli roberto@REDACTED
Wed Nov 30 22:55:54 CET 2011

dear list,

i've got a process that has been started by a supervisor with

this process is mainly listening on new incoming TCP connections using
gen_tcp:accept (or the SSL equivalent), with a timeout set to infinity.
when a new connection gets requested, the acceptor process spawns a new
process which will handle this new connection, and then it returns to
listening for new connection requests.

what is the best way to ensure that the listening acceptor process gets
updated on hot code swapping? do i just need to add a the ?MODULE macro in
front of the calls that get back to the acceptor loop, i.e.
?MODULE:acceptor_loop? should i actually timeout the acceptor? is there any
particular system event i should be catching?

any input warmly welcome.

thank you,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111130/078866c2/attachment.htm>

More information about the erlang-questions mailing list