The functions in this library do not require an instance of `Amp\Parallel\Worker\Pool` to be provided.
When a pool instance is not provided, the default worker pool in `amphp/parallel` is used, which can be configured using `Amp\Parallel\Worker\pool()` in version 0.2 of `amphp/parallel`.
All you need is wrapping every function returning an [`Amp\Promise`](https://amphp.org/amp/promises/) with [`Amp\Promise\wait()`](https://amphp.org/amp/promises/miscellaneous#wait).
{:.warning}
> Don't write anything directly (using `fwrite()` / `fputs()`) to `STDOUT` inside functions executed in parallel.
> This will break the communication channel with the parent.
> You can use `echo` / `print` / `var_dump` just as normal, these will automatically be redirected to `STDERR` of the parent.
`Amp\ParallelFunctions\parallel(callable, Amp\Parallel\Worker\Pool|null): callable` wraps a [`callable`](https://secure.php.net/callable), so it's executed in another thread / process on invocation.
The default worker pool (the pool returned by `Amp\Parallel\Worker\pool()`) will be used unless an optional `Amp\Parallel\Worker\Pool` instance is provided.
`Amp\ParallelFunctions\parallelMap(array, callable, Amp\Parallel\Worker\Pool|null): Promise` works similar to [`array_map()`](https://secure.php.net/array_map), but has a different signature.
`Amp\ParallelFunctions\parallelFilter(array, callable, int, Amp\Parallel\Worker\Pool|null): Promise` works like [`array_filter()`](https://secure.php.net/array_filter), but returns a promise and executes in parallel.