[erlang-questions] hibernate/timeout

Damien Morton <>
Thu Jun 14 22:37:17 CEST 2007


Hello,

Im new to the list, so... hello everyone.

Wanted to ask a question about managing large numbers of very 
lightweight processes.

Ive discovered the hibernate() function, which should prove usefull as 
most of the processes I will be using will be asleep for extended 
periods of time - minutes, hours and even days, though this sleep will 
very often be interrupted.

Im wondering, however, if a process which is hibernating will timeout if 
its receive loop has a timeout clause, or whether, once placed into 
hibernation, it will remain there until an external process sends it a 
message.

My intention was to make processes hibernate after a period of time in 
which they receive no messages, and to then wake up after a certain 
period of time.

Ive had a look at the timer module, which seems to use ets as a priority 
queue. Id rather stick with the built-in timeout mechanism, if possible. 
>From what I read, its timer-wheel implementation is very efficient.

Thanks,

Damien Morton






More information about the erlang-questions mailing list