gen_server

Valentin valentin@REDACTED
Wed Dec 17 08:22:20 CET 2003


From: "Vlad Dumitrescu" <vlad_dumitrescu@REDACTED>
>
> Just a thought: from my experience this pattern is used quite a lot, so it
might
> be useful to incorporate it in the basic gen_server. For example, one
could use
> gen_server:spawn_worker that will also handle the bookkeeping and also
handle
> worker exits behind the scenes. Some hooks can be provided for
customization.
>
> Would it be wrth the trouble?
>
I do this a lot, but I think it would be a bad idea to make this a part of
existing gen_server (imagine how many ets tables can be created this way),
instead, why not make a completely new behaviour that incorporates this
functionality (i.e. gen_spawner, that is gen_server with a twist).

Valentin.





More information about the erlang-questions mailing list