SV: Trouble with gen_server

mark@REDACTED mark@REDACTED
Tue Mar 28 16:49:19 CEST 2006


On Tue, Mar 28, 2006 at 03:41:30PM +0100, mark@REDACTED wrote:
> Ok, me being daft there. So how can I handle the timeout? I don't want
> the gen_server to die when the call exceeds the timeout, I just want to
> be able to reflect that this has happened.

Sorry, sorry... still being daft. That solves both my problems doesn't
it. Thanks very much everyone.

Mark

> 
> Thanks,
> 
> Mark
> 
> On Tue, Mar 28, 2006 at 04:20:35PM +0200, Matthias Lang wrote:
> > Mark Lee writes:
> > 
> >  > Ok, as simple as I can get.
> >  > 
> >  > 1> test:start_link().
> >  > {ok,<0.33.0>}
> >  > 2> test:test().
> >  > ** exited: {timeout,{gen_server,call,[test,test]}} **
> >  > 3> test:test().
> >  > ** exited: {noproc,{gen_server,call,[test,test]}} **
> > 
> > Your first line starts the server AND LINKS IT TO THE SHELL.
> > 
> > So, when your call fails, your shell process dies. And thus your gen
> > server must die too.
> > 
> > If you don't want that to happen, don't link the gen_server to the
> > shell.
> > 
> > Matthias
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> !DSPAM:44294bef188059629497355!
> 
> 



More information about the erlang-questions mailing list