Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3816d61

Browse filesBrowse files
committed
[Lock] Use distinct store for forked processes
1 parent 828ac17 commit 3816d61
Copy full SHA for 3816d61

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Lock\Exception\LockConflictedException;
1515
use Symfony\Component\Lock\Key;
16-
use Symfony\Component\Lock\StoreInterface;
1716

1817
/**
1918
* @author Jérémy Derussé <jeremy@derusse.com>
@@ -38,8 +37,6 @@ public function testBlockingLocks()
3837
// Amount a microsecond used to order async actions
3938
$clockDelay = 50000;
4039

41-
/** @var StoreInterface $store */
42-
$store = $this->getStore();
4340
$key = new Key(uniqid(__METHOD__, true));
4441
$parentPID = posix_getpid();
4542

@@ -50,6 +47,7 @@ public function testBlockingLocks()
5047
// Wait the start of the child
5148
pcntl_sigwaitinfo(array(SIGHUP), $info);
5249

50+
$store = $this->getStore();
5351
try {
5452
// This call should failed given the lock should already by acquired by the child
5553
$store->save($key);
@@ -71,6 +69,8 @@ public function testBlockingLocks()
7169
} else {
7270
// Block SIGHUP signal
7371
pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP));
72+
73+
$store = $this->getStore();
7474
try {
7575
$store->save($key);
7676
// send the ready signal to the parent

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.