Skip to content

Commit e1f747a

Browse files
committed
cs
1 parent b868ff9 commit e1f747a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

components/lock.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,17 @@ will be released automatically as soon as one process finishes::
215215

216216
$pid = pcntl_fork();
217217
if ($pid == -1) {
218-
die('could not fork');
218+
exit('Could not fork');
219219
} elseif ($pid) {
220-
// Parent process
221-
sleep(30);
220+
// Parent process
221+
sleep(30);
222222
} else {
223-
// Child process
224-
echo 'The lock will be released now.'
225-
exit(0);
223+
// Child process
224+
echo 'The lock will be released now.'
225+
exit(0);
226226
}
227227
// ...
228228

229-
230229
To disable this behavior, one needs to set the 3rd argument to the ``LockFactory::createLock()``
231230
to false. That will make the Lock acquired for 3600 seconds or until ``Lock::release()``
232231
is called.

0 commit comments

Comments
 (0)