mirror of
https://github.com/danog/parallel.git
synced 2024-12-02 17:52:14 +01:00
CS Fix
This commit is contained in:
parent
8b74bb33f8
commit
26f869734a
@ -6,7 +6,7 @@ use Amp\Promise;
|
|||||||
|
|
||||||
class DefaultContextFactory implements ContextFactory
|
class DefaultContextFactory implements ContextFactory
|
||||||
{
|
{
|
||||||
function create($script): Context
|
public function create($script): Context
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Creates a thread if ext-parallel is installed, otherwise creates a child process.
|
* Creates a thread if ext-parallel is installed, otherwise creates a child process.
|
||||||
@ -25,7 +25,7 @@ class DefaultContextFactory implements ContextFactory
|
|||||||
*
|
*
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
function run($script): Promise
|
public function run($script): Promise
|
||||||
{
|
{
|
||||||
if (Parallel::isSupported()) {
|
if (Parallel::isSupported()) {
|
||||||
return Parallel::run($script);
|
return Parallel::run($script);
|
||||||
|
@ -7,7 +7,7 @@ use Amp\Parallel\Context\DefaultContextFactory;
|
|||||||
use Amp\Parallel\Sync\ContextPanicError;
|
use Amp\Parallel\Sync\ContextPanicError;
|
||||||
use Amp\PHPUnit\AsyncTestCase;
|
use Amp\PHPUnit\AsyncTestCase;
|
||||||
|
|
||||||
class DefaultWorkerFactoryTest extends AsyncTestCase
|
class DefaultContextFactoryTest extends AsyncTestCase
|
||||||
{
|
{
|
||||||
public function testCreate(): void
|
public function testCreate(): void
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user