gen_server partial replies

Bengt Kleberg Bengt.Kleberg@REDACTED
Mon Nov 24 11:57:17 CET 2003

Vlad Dumitrescu wrote:
> What I had in mind was a way to handle requests that take a lot of time and
> return a lot of data. If I want or need to display some progress reports, or to
> be able to handle a crash before all data is returned (so that it's not
> recomputed), then it would be nice with a way to split the results in chunks.

pass a callback function to handle_cast/3. let the worker use the 
callback, with the partial data, while it is computing. when all is done 
you supply a ''stop sign'' instead of the normal data.


More information about the erlang-questions mailing list