Qore Programming Language Reference Manual 0.8.12.9
|constructor (Gate gate)|
|Creates the AutoGate object based on the Gate argument passed and immediately calls Gate::enter() More...|
|Throws an exception; objects of this class cannot be copied. More...|
|Calls Gate::exit() and destroys the AutoGate object. More...|
AutoGate objects, when used along with a Gate object, allow Qore programmers to safely enter and exit a Gate lock, even if exceptions are thrown or return statements are executed in the block where the AutoGate object is created.
AutoGate objects enter the gate lock for the lifetime of the AutoGate object. For this reason, it is only appropriate to assign an AutoGate object to a local variable, so when the local variable goes out of scope, the AutoGate object will be deleted and the gate automatically exited.
Throws an exception; objects of this class cannot be copied.
|AUTOGATE-COPY-ERROR||objects of this class cannot be copied|