We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b868ff9 commit e1f747aCopy full SHA for e1f747a
components/lock.rst
@@ -215,18 +215,17 @@ will be released automatically as soon as one process finishes::
215
216
$pid = pcntl_fork();
217
if ($pid == -1) {
218
- die('could not fork');
+ exit('Could not fork');
219
} elseif ($pid) {
220
- // Parent process
221
- sleep(30);
+ // Parent process
+ sleep(30);
222
} else {
223
- // Child process
224
- echo 'The lock will be released now.'
225
- exit(0);
+ // Child process
+ echo 'The lock will be released now.'
+ exit(0);
226
}
227
// ...
228
229
-
230
To disable this behavior, one needs to set the 3rd argument to the ``LockFactory::createLock()``
231
to false. That will make the Lock acquired for 3600 seconds or until ``Lock::release()``
232
is called.
0 commit comments