[erlang-questions] gen_server and init

Matthew Evans mattevans123@REDACTED
Mon Jul 27 16:25:53 CEST 2015


Hi,
We have used this pattern in gen_servers for a long time now:
init(_) ->   %% Some stuff   {ok, #state{}, 0}.
%%%%%%
handle_info(timeout, State) ->    %% Init stuff    {noreply,State}
Basically the idea is to prevent init from blocking and to have init/1 return with a timeout of 0 causing an immediate timeout message to be invoked in the handle_info.
Here's what's odd. Sometimes this timeout does not fire. It doesn't appear that any message is getting sent, but I would imagine that since it's a registered gen_server there is no way that can happen.
Does anyone have any ideas?
We are running vsn 17.1, and ntp is enabled on the host (Linux).
Thanks 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150727/74410dc2/attachment.htm>


More information about the erlang-questions mailing list