mirror of
https://github.com/danog/parallel.git
synced 2024-12-02 17:52:14 +01:00
f2e5224856
Allows scripts to be written for either context.
9 lines
161 B
PHP
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);
|
|
};
|