TimerServicesVerify

Verifies timer owners.

Synopsis

Err TimerServicesVerify (void)

Description

This function causes the TimerServices thread to check all outstanding timers to make sure the tasks and threads that created them are still running. If any tasks or threads have died without releasing their timers, this function releases them.

This function is intended to be called by the task that started the service thread. If a main task starts the service thread and then spawns other tasks that may use the services, it can call this function after each child task has completed. This function forces a cleanup of any timers a child task left outstanding, which can help prevent the leaking away of resources from the main task's memory/item pools. The cleanup will not affect any timers belonging to child tasks or threads which are still running.

When the library is compiled with DEBUG=1 in effect, this function reports in the debugger terminal window any cleanup actions it has to take. This can help you identify tasks or threads which are leaving timers outstanding when they terminate.

Return Value

Zero on success or a negative error code. If some timers had to be released because their owners died, that is NOT considered to be an error.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, timerutils.h