1
0
mirror of https://github.com/danog/parallel.git synced 2025-01-22 22:11:11 +01:00
parallel/lib/Context.php
2016-08-21 23:40:48 -05:00

28 lines
502 B
PHP

<?php declare(strict_types = 1);
namespace Amp\Concurrent;
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;
}