1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-12 09:09:35 +01:00
parallel/lib/Worker/Task.php
Aaron Piotrowski b654463339
Fix code style
2018-10-07 09:50:45 -05:00

21 lines
419 B
PHP

<?php
namespace Amp\Parallel\Worker;
/**
* A runnable unit of execution.
*/
interface Task
{
/**
* Runs the task inside the caller's context.
*
* Does not have to be a coroutine, can also be a regular function returning a value.
*
* @param \Amp\Parallel\Worker\Environment
*
* @return mixed|\Amp\Promise|\Generator
*/
public function run(Environment $environment);
}