Compartilhar via


Implementing LooksAlive

If you do not implement asynchronous failure detection for a resource type, the Resource Monitor calls the LooksAlive entry point function for each instance of that type. The LooksAlivePollInterval property controls the frequency of these calls. If LooksAlive returns FALSE, IsAlive will be called immediately.

To implement LooksAlive

  1. Required: The LooksAlive entry point function can be called concurrently with the Terminate entry point function. Any resources that are accessed by both entry points must be properly guarded.

  2. Recommended: Perform one or more very fast, cursory checks of the specified instance with the emphasis on detecting potential problems rather than verifying operational status. IsAlive will determine whether the instance is really operational.

  3. Recommended: Adjust the LooksAlivePollInterval property to an appropriate value.

  4. Recommended. Take no more than 300 milliseconds to return a value.

Example

See Resource DLL Examples.