Timeout on calls to get_request() and set()
Frank Fock
Frank.Fock____t-online.de
Fri Jun 2 13:29:28 CEST 2000
helge.fredriksen____4tel.no wrote:
> I believe that a when a request i received by the agent, a seperate thread
> is spawned to handle this request?
>
Correct.
>
> Inside such a thread I belive is executed the code which was put into the
> code skeleton which we received from AgentGen.
>
Correct.
>
> My question is: What if the code inside such a thread failes, and hangs up
> (eg. in a infinite loop)?. Will the agent then hang up, or will this thread
> timeout after a while?
>
The thread will loop forever. Cancellation of threads from outside (i.e.,
the main thread) is a dangerous thing. A save thing would be to set a
stop variable which is checked in the hanging thread from time to time.
But the above cannot work if your call to your management instrumentation
hangs. Thus, I suggest to implement a timeout handling in the call that may
hang without it.
Best regards,
Frank
More information about the AGENTPP
mailing list