Releasing a latch (ISGLREL and ISGRE64 services)

Requestors can call the Latch_Release service to release an owned latch or a pending request to obtain a latch. It is important to release latches when they are no longer needed so other requestors can obtain those latches.

When processing a Latch_Release request, the latch manager runs more slowly if contention for the latch exists at the time of the call to Latch_Release. To allow the latch manager to release latches most efficiently, you should design your application to minimize contention for resources.

It is possible that a requestor might end (either normally or abnormally) without releasing an owned latch or a pending request to obtain a latch. To make such a latch available, code in your application's recovery can call the Latch_Release service. Your application's recovery can also call the Latch_Purge service to purge all granted and pending requests for a particular requestor within a specific latch set. See Providing recovery for the latch manager for additional information.