[erlang-questions] Stopping gen_server during processing

Janos Hary <>
Fri Nov 8 08:55:09 CET 2013


All,

 

I have a gen_server process which periodically processes new records from a
database. I use timer:send_after to schedule gathering and processing new
records. I can gracefully stop the gen_server when it is waiting, but I need
a way to stop it during processing. Of cause I only want to stop it at
certain points of the processing, for example before starting to process the
next record. I need to group the records, so I cannot ask them one by one
from the db.

 

What is the preferred way of doing this?

 

Thanks for your answers in advance.

Janos  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131108/c13c4f23/attachment.html>


More information about the erlang-questions mailing list