Altova StyleVision 2024 Professional Edition

Long running CPU-intensive scripts may ask the user if the script should be terminated. The watchdog() method is used to disable or enable this behavior. By default, the watchdog is enabled.

 

Calling watchdog(true) can also be used to reset the watchdog. This can be useful before executing long running CPU-intensive tasks to ensure they have the maximum allowed script processing quota.

 

Signature

watchdog(bEnable : boolean) -> void

 

Example

watchdog( false ); // disable watchdog - we know the next statement is CPU intensive but it will terminate for sure
doCPUIntensiveScript();
watchdog( true );   // re-enable watchdog

© 2018-2024 Altova GmbH