JCL Help:TJclMeteredSection.Leave@Longint

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Increases the MeteredSection's count.


Pascal

 public function Leave(ReleaseCount: Longint): Boolean; overload;
public function Leave(ReleaseCount: Longint; out PrevCount: Longint): Boolean; overload;


Parameters

Parameters Description
ReleaseCount: Longint Specifies the number of the metered section's slots to release. The value must be greater than zero. If the specified amount would cause the metered section's count to exceed the maximum number of available slots specified during creation of the metered section, the number of available slots is not changed and the function returns False.
out PrevCount: Longint 32-bit Longint which receives the previous metered section open slot count.


Return Value

If the function succeeds the result is True, otherwise the result is False.


Description

The LeaveMeteredSection function increases the number of available slots of a metered section by a specified amount but never increases past the maximum count as specified during construction. As a result of incrementing the count one or more waiting threads may be released from their wait state. Note that incrementing the count is not thread bound. That is, all threads may call Leave even though they never called Enter.


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