JVCL Help:TJvMTSection.AllowRecursion
JVCL Help: TJvMTSection.AllowRecursion Property
Search in JVCL Help
Search in all projectsSummary
Specifies whether calls to Enter are allowed within a critical section.
Pascal
propertyAllowRecursion: Boolean;
Description
When the Enter method is called multiple time by the same thread this option determines if a 2nd call blocks or succeeds.
If AllowRecursion is set to true, then an Enter call from a specific thread within the critical section will succeed immediately, otherwise it would block indefinitely.JvMTSection1.AllowRecursion := True;
JvMTSection1.Enter;
// begin of critical section
// next call will succeed immediately
JvMTSection1.Enter;
JvMTSection1.Leave;
// next call leaves the critical section
JvMTSection1.Leave;
About
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