mirror of
https://github.com/danog/parallel.git
synced 2024-11-27 04:44:56 +01:00
Merge branch 'master' of https://github.com/icicleio/concurrent
Conflicts: tests/Threading/ThreadTest.php
This commit is contained in:
commit
9f86336edd
@ -50,7 +50,7 @@ class PosixSemaphoreTest extends TestCase
|
||||
|
||||
public function testAcquireMultiple()
|
||||
{
|
||||
$this->assertRunTimeBetween(function () {
|
||||
$this->assertRunTimeGreaterThan(function () {
|
||||
$semaphore = new PosixSemaphore(1);
|
||||
|
||||
Coroutine\create(function () use ($semaphore) {
|
||||
@ -72,7 +72,7 @@ class PosixSemaphoreTest extends TestCase
|
||||
|
||||
Loop\run();
|
||||
$semaphore->free();
|
||||
}, 1.5, 1.65);
|
||||
}, 1.5);
|
||||
}
|
||||
|
||||
public function tesCloneIsSameSemaphore()
|
||||
|
@ -28,7 +28,7 @@ class MutexTest extends TestCase
|
||||
{
|
||||
Loop\loop();
|
||||
|
||||
$this->assertRunTimeBetween(function () {
|
||||
$this->assertRunTimeGreaterThan(function () {
|
||||
Coroutine\create(function () {
|
||||
$mutex = new Mutex();
|
||||
|
||||
@ -49,6 +49,6 @@ class MutexTest extends TestCase
|
||||
});
|
||||
|
||||
Loop\run();
|
||||
}, 1.5, 1.65);
|
||||
}, 1.5);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class SemaphoreTest extends TestCase
|
||||
{
|
||||
Loop\loop();
|
||||
|
||||
$this->assertRunTimeBetween(function () {
|
||||
$this->assertRunTimeGreaterThan(function () {
|
||||
Coroutine\create(function () {
|
||||
$semaphore = new Semaphore(1);
|
||||
|
||||
@ -55,6 +55,6 @@ class SemaphoreTest extends TestCase
|
||||
});
|
||||
|
||||
Loop\run();
|
||||
}, 1.5, 1.75);
|
||||
}, 1.5);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user