1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-12 09:09:35 +01:00
parallel/test/Context/Fixtures/delayed-process.php
Aaron Piotrowski f2e5224856
Unite Process and Parallel context interfaces
Allows scripts to be written for either context.
2019-02-17 23:50:41 -06:00

9 lines
161 B
PHP

<?php
use Amp\Delayed;
use Amp\Parallel\Sync\Channel;
return function (Channel $channel) use ($argv) {
yield new Delayed((int) ($argv[1] ?? 1) * 1000);
};