mirror of
https://github.com/danog/parallel.git
synced 2024-12-04 18:47:50 +01:00
28 lines
500 B
PHP
28 lines
500 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace Amp\Parallel;
|
|
|
|
use Interop\Async\Awaitable;
|
|
|
|
interface Context {
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function isRunning(): bool;
|
|
|
|
/**
|
|
* Starts the execution context.
|
|
*/
|
|
public function start();
|
|
|
|
/**
|
|
* Immediately kills the context.
|
|
*/
|
|
public function kill();
|
|
|
|
/**
|
|
* @return \Interop\Async\Awaitable<mixed> Resolves with the returned from the context.
|
|
*/
|
|
public function join(): Awaitable;
|
|
}
|