gen_server partial replies

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Mon Nov 24 11:12:28 CET 2003


> fredag 21 november 2003 17:29 skrev Bengt Kleberg:
> > why do you want to do a partial reply? if it is to free up the server
> > for other call's, then you could
> > 1 spawn a new process
> > 2 return {noreply, State};
> > 3 use gen_server:reply(Pid, Reply), from the spawned process, when ready
> > to do so

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.

Of course I can write a specific implementation, but I was wondering if this
might be something to handle in a general, standard way.

regards,
Vlad



More information about the erlang-questions mailing list