JCL Help:TJclMutex.Release

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Releases ownership of the mutex.


Pascal

 public function Release: Boolean;


Return Value

If the function succeeds it returns True, otherwise it returns False. In the latter case, which is usually a result of not owning the mutex, you can call GetLastError to get extended error information.


Description

The Release method release ownership of the mutex which was previously obtained by using one of the WaitXxx methods. Note that although only one thread can own a mutex at any time, a single thread can own the mutex multiple times by calling one of the WaitXxx methods multiple times. You must balance the calls to WaitXxx and Release, meaning you must call Release once for each time you call WaitXxx.


About

Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page