[erlang-questions] Thoughts on when to use 'infinity' timeouts for gen_server:call and friends

bile@REDACTED bile@REDACTED
Wed Aug 4 15:18:20 CEST 2010


I understand it's a drastic change but couldn't it be shouted from the
rooftops that it's being made and keep the functions the same? Or
provide a global switch to revert back from infinity to the old default?

If it's a better way of doing things providing a new API will probably
take years to take hold. All those that explicitly use infinity have no
incentive to change it and all the tutorials/books that exist won't
be using it. If it was a global flag then at most you have to do when
moving to R15 or whatever is add commandline arg or such. For those
outdated tutorials which refer to the default timeout so long as it's
made clear it changed and why in the docs for the next few releases I'd
think people would be OK.

On Wed, 04 Aug 2010 12:57:22 +0200
Ulf Wiger <ulf.wiger@REDACTED> wrote:

> On 08/03/2010 08:35 PM, Kenneth Lundin wrote:
> >
> > If we can find a suitable name we could also introduce new functions
> > with arity 2 and 3
> > replacing gen_server:call/2 and 3.
> >
> > Some suggestions on names are:
> > call2
> > call_ex (following the style in the Windows API)
> > call_nt/2 (nt standing for no timeout, but does that make sense for
> > a call_nt/3 where the third
> > argument is the timout in seconds or infinity)
> >
> > Suggestions on names are welcome.
> 
> gen_server:rpc/2?
> 
> (It might confuse some into thinking that it is only used for
> distributed communication, but this should pass quickly. :)
> 
> gen_server:req/2 (as in 'request')?
> 
> or...
> 
> gen_server:synch/2
> gen_server:asynch/2  (corresponding to cast/2)
> 
> BR,
> Ulf W
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> 



More information about the erlang-questions mailing list