1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Oinktube/vendor/amphp/parallel/lib/Worker/Task.php
2022-09-13 16:59:24 -03:00

20 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);
}