2
votes

Say I have a gen_server process, P, which contains codes like this

handle_call(get_a, _From, #state{a = 1}=S) ->
    Reply = S#state.a,
    {reply, Reply, S, T=1000000};

If I do gen_server:call(P, get_a), then I would get a reply, namely 1, and if no message was sent to P in T after the gen call, then a timeout will occur.

If I do a sys:get_status(P) immediately after the gen call, would this cancel the timeout?

1

1 Answers

5
votes

Calling sys:get_status/1,2 on your gen_server process does not cancel the timeout. And just for completeness, note that this is true whether or not your gen_server implements the optional format_status/2 callback.