mirror of
https://github.com/amphp/parallel.git
synced 2025-07-18 12:01:24 +02:00
Some checks are pending
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on Windows, windows-latest, nts, 8.3) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on macOS, macos-latest, nts, 8.3) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.1) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.2) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.3) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.2, none, none) (push) Waiting to run
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.3, none, none) (push) Waiting to run
26 lines
682 B
PHP
26 lines
682 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Amp\Parallel\Test\Worker;
|
|
|
|
use Amp\Parallel\Context\ThreadContext;
|
|
use Amp\Parallel\Context\ThreadContextFactory;
|
|
use Amp\Parallel\Worker\ContextWorkerFactory;
|
|
use Amp\Parallel\Worker\Worker;
|
|
|
|
class ThreadWorkerTest extends AbstractWorkerTest
|
|
{
|
|
protected function createWorker(?string $autoloadPath = null): Worker
|
|
{
|
|
if (!ThreadContext::isSupported()) {
|
|
$this->markTestSkipped('ext-parallel required');
|
|
}
|
|
|
|
$factory = new ContextWorkerFactory(
|
|
bootstrapPath: $autoloadPath,
|
|
contextFactory: new ThreadContextFactory(),
|
|
);
|
|
|
|
return $factory->create();
|
|
}
|
|
}
|