How to 'bypass' the receive timer

Per Bergqvist per@REDACTED
Sun Feb 10 08:43:37 CET 2002


Lennart Ohman wrote:                                                  
> it sounds to me that what you want to do is to start a set a timer  
> in the timer process for each handled message which will be followed
by                                                                    
> a second message. Look in stdlib for timer.                         
> timer:send_after(Time,MessageIWillGetBack) for instance. If you get 
the                                                                   
                                                                      
Note that timer:send_after does not scale well.                       
It will give you problems if you have many concurrent sessions.       
Use erlang:start_timer instead.                                       
                                                                      
In my opinion the only meaningful function in the timer module is     
exit_after. At least I view the other functions as backward           
compatibility code, and try to avoid use the timer module.            
                                                                      
                                                                      
/Per                                                                  
                                                                      



More information about the erlang-questions mailing list