Home Help Center

Question about "Ice.MonitorConnections"

OrNotOrNot Member Bin.LiOrganization: GE HealthcareProject: Enterprise solution
hi, there,
In the 39.3.4 , the manual said: For clients that use AMI, we set Ice.MonitorConnections so that AMI
timeouts operate correctly.
I can not understand it very well. Could you pleas give me more explainations about it?

TIA
OrNot

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    When you invoke a synchronous operation with a timeout, the Ice run time is able to use the application's thread to block for the specified amount of time and then raise TimeoutException if necessary.

    This isn't possible when you invoke an operation asynchronously, because the application's thread doesn't block in the Ice run time. Therefore, if you want your AMI callback object to be notified about a timeout, the Ice run time must use a separate thread that periodically checks the pending requests to see if any of them have timed out. If a timeout occurs, the Ice run time notifies the AMI callback by invoking its ice_exception method with a TimeoutException argument. The Ice.MonitorConnections property determines how frequently this dedicated thread checks the pending requests for timeouts. This thread is also responsible for closing inactive connections, which is where the property derived its name.

    Hope that helps,
    - Mark
  • OrNotOrNot Member Bin.LiOrganization: GE HealthcareProject: Enterprise solution
    So good. Thank you very much.
Sign In or Register to comment.