Extending Functionality: gen_server_ext

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Wed Mar 19 20:36:38 CET 2003


> But surely the client isn't expecting the call to be transformed into a
> cast... ??  My vague feeling is that ideally there should be one function,
> gen_server_ext:next(), that goes to the same type of handler (cast, call,
> info etc) in the next behaver.

Oh, sorry -- I didn't read your question properly. Long day, lots of work
:-) Of course my answer only applies to calling next_call from a handle
call.

> Another question: what are the pros and cons of having to call next_call()
> et al, as opposed to returning a value like {next_call, ...} from the
> handler, and having gen_server_ext pay attention to that?

If you return with {next_call, ...} then you can't get the answer back and
refine it. It's something in between the two options you mentioned before, I
think.

I have this feeling that there's a lot more to dig out here.

regards,
Vlad



More information about the erlang-questions mailing list