Overview
Whenever the engine creates a new device, a watchdog thread is created to periodically report that the device is operating normally (the report period is 100ms). If the watchdog thread becomes closed (for example, because the process that created the device has closed abnormally without calling CloseDevice), the engine will detect that the device is dead after the watchdog time out period, and automatically close the device.
The default watchdog time out period of a new device is 15 seconds, or if specified, the value of the “ImAliveTimeOut” parameter in the Modules.ini configuration file.
To change the watchdog time out period of a device, call the SetWatchdog function from that device. The minimum time out period is 1000 milliseconds (1 second).
The watchdog timer can be disabled by calling the SetWatchdog function specifying 0 for the watchdog time out period. If the watchdog timer is disabled, any devices that were not properly closed will remain open until the engine is restarted.
After the last device is closed by a watchdog time out, the engine will automatically close (unless this behavior is changed with the AutoQuitWithoutActiveDev function).