gen_server:call/3 and timeout handling
zabrane Mikael
zabrane3@REDACTED
Wed Dec 2 23:48:12 CET 2009
Hi List !
When I use the call "gen_server:call/3 (I mean using the timeout option),
a timout may occur if the corresponding "gen_server:handle_call/3" takes
take too long.
Then, the whole "gen_server" crashes with an error report.
What I'd like to achieve is to "intercept" this "timeout" message in my
"gen_server" code and handle
it gracefully without stopping my "gen_server" (eg. by sending back a reply
with reason = timeout).
Is this possible? Is there a best practice for that?
Regards
Zabrane
More information about the erlang-questions
mailing list