[erlang-questions] Erlang at Facebook - hibernation and gen_server

Witold Baryluk baryluk@REDACTED
Tue Jun 30 14:29:24 CEST 2009


Dnia 2009-06-30, wto o godzinie 05:34 +0100, Davide Marquês pisze:
> Hi all!
> 
> I was going through Eugene Letuchy's Erlang at
> Facebook<http://www.erlang-factory.com/conference/SFBayAreaErlangFactory2009/speakers/EugeneLetuchy>presentation
> when this popped up:
> 
> > Hibernation
> > [...] not compatible with gen_server:call (and gen_server:reply)
> >  - gen_server:call has its own receive() loop
> >  - hibernate() doesn't support have a explicit timeout
> >  - fixed with a few hours and a look at gen.erl"
> >
> 
> What's incompatible about gen_server/hibernate that needs fixing?
> I already read in the documentation about having to call
> proc_lib:hibernate/3,
> but I the slides seem to mentioning something else... :\
> 
> Does anyone know what this is about?
> 
> Thanks in advance,
> :Davide

This is really strange, that only gen_event supports explicit hibernate
ie. returning {ok, Reply, State1, hibernate} from handle_call.

gen_server and fsm lacks support for hibernate.

-- 
Witold Baryluk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: To jest cz??? wiadomo?ci podpisana cyfrowo
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090630/b37d1ba9/attachment.bin>


More information about the erlang-questions mailing list