mirror of
https://github.com/danog/parallel.git
synced 2024-12-04 18:47:50 +01:00
30 lines
436 B
PHP
30 lines
436 B
PHP
<?php
|
|
namespace Icicle\Concurrent;
|
|
|
|
interface Context
|
|
{
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function isRunning(): bool;
|
|
|
|
/**
|
|
* Starts the execution context.
|
|
*/
|
|
public function start();
|
|
|
|
/**
|
|
* Immediately kills the context.
|
|
*/
|
|
public function kill();
|
|
|
|
/**
|
|
* @coroutine
|
|
*
|
|
* @return \Generator
|
|
*
|
|
* @resolve mixed
|
|
*/
|
|
public function join(): \Generator;
|
|
}
|